dismissAlert
Dismiss a system alert dialog on iOS.
Partial support in Astra Scout
iOS only. The step is not available on Android; tap the dialog button with tapOn instead.
The dismissAlert command dismisses the system alert that is on screen (Don't Allow or Cancel), for example a permission prompt. It waits for the alert to appear.
Syntax
yaml
- dismissAlertParameters
The command takes no arguments. The common step options apply.
| Option | Description |
|---|---|
timeout | How long to wait for an alert, in milliseconds. Defaults to 5000. |
optional | Standard step option. |
label | Standard step option. |
Behavior
- The step polls for an alert about every 500 ms until the timeout.
- If no alert appears, the step still passes with the message "No alert to dismiss". Use
assertVisiblefirst if the alert must be there. - To pick a specific button, use
tapOn, for exampletapOn: "Don't Allow". See alsoacceptAlert.
Usage example
yaml
- launchApp
- dismissAlert:
timeout: 8000