Skip to content

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
- acceptAlert

Parameters ​

The command takes no arguments. The common step options apply.

OptionDescription
timeoutHow long to wait for an alert, in milliseconds. Defaults to 5000.
optionalStandard step option.
labelStandard 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 assertVisible first if the alert must be there.
  • To pick a specific button, use tapOn, for example tapOn: "Allow". See also dismissAlert.

Usage example ​

yaml
- launchApp
- acceptAlert:
    timeout: 8000