dismissDialog
Class: matlab.uitest.TestCase
Namespace: matlab.uitest
Syntax
Description
dismissDialog dismisses an app or
system dialog box in a test. When you dismiss a dialog box, you close
it without making a selection in the dialog box.
For more information about app and system dialog boxes and their blocking behavior, see Summary of Dialog Boxes.
App Dialog Boxes
dismissDialog(
dismisses the frontmost nonblocking app dialog box of the specified type in the figure
window.testCase,dialogType,fig)
dismissDialog(
dismisses the frontmost blocking app dialog box of the specified type. Because a blocking dialog box prevents additional commands from
running while it is open, it must be created as part of the method call by using the
testCase,dialogType,fig,fcn)fcn function handle.
When you use this syntax, the method first creates a blocking app dialog box by invoking the specified function handle. The method then dismisses the dialog box, which allows code execution to continue.
System Dialog Boxes
dismisses the system dialog box of the specified type and returns information about the
interaction with the dialog box. Because a system dialog box is blocking, it must be
created as part of the method call by using the dialogData = dismissDialog(testCase,dialogType,fcn)fcn function
handle. (since R2026a)