The following action takes a screenshot and saves it to <base_dir>/mobile/auth/login.png:
If the Take Screenshot action with the Path parameter is executed multiple times (for instance, in different browsers or quarantine runs), all screenshots are written to the specified location. As a result, screenshots are overwritten.
Select the Handle all dialogs radio button to handle all dialogs with the default actions.
The following table describes how dialogs are handled in this instance:
The OK button is clicked.
The Cancel button is clicked.
Nothing is typed into an input. The Cancel button is clicked.
The Leave button is clicked.
Use Custom Actions to Handle Specific Dialogs
Select the Handle specific dialogs radio button to specify the expected dialogs' parameters and actions used to handle them.
Use the + Alert, + Confirm, + Prompt and + Beforeunload buttons to specify parameters for different dialog types.
You can click each button several times to specify the expected parameters and actions for multiple dialogs.
Each click adds a new rule. You can specify a parameter (like a dialog message) in one rule and omit it in the other. In this instance, the first rule is used to handle a dialog with the specified message, while the second handles all other dialogs.
If you call Handle Native Dialogs multiple times, new settings take priority and dialogs expected previously are no longer handled.
Options That Describe the Expected Dialogs
The expected dialog message. If this option is disabled, dialogs containing any message are handled.
The expected dialog origin URL (the main window's or an iframe's URL). If this option is disabled, dialogs from all URLs are handled.
If a dialog with a different message or origin URL appears, the test fails.
Options That Define How to Handle Dialogs
The action that closes the dialog. For instance, OK or Cancel.
Text to type into an input field.
The beforeunload dialog can be closed only with the Leave button.
Stop Handling Native Dialogs
Disables handling native dialogs. Use this action to ensure that no dialogs appear after it is called.
If a native dialog pops up after this action, the test fails.
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.