acceptAlert
Accept 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 acceptAlert command accepts the system alert that is on screen (Allow or OK), for example a permission prompt. It waits for the alert to appear.
Syntax
yaml
- acceptAlertParameters
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 accept". Use
assertVisiblefirst if the alert must be there. - To pick a specific button, use
tapOn, for exampletapOn: "Allow". See alsodismissAlert.
Usage example
yaml
- launchApp
- acceptAlert:
timeout: 8000