Dialog Steps

Native browser dialogs: alert, confirm, prompt. Pre registered handlers so scenarios never hang.

Step phrasings in this group

The book sidebar lists each individual step page under this group.

Given I will accept the next dialog

Auto-accept the next native browser dialog (alert / confirm / prompt).

Given I will dismiss the next dialog

Auto-dismiss the next native browser dialog.

Given I will accept the next dialog with "alice@example.com"

Auto-accept the next prompt with the supplied text input.

Then the last dialog message should be "Are you sure?"

Assert the most recently captured dialog message equals an expected value.

Then the last dialog message should contain "Are you sure"

Assert the most recently captured dialog message contains an expected substring.

Then the last dialog type should be "confirm"

Assert the most recently captured dialog type matches one of alert,

Given I accept all confirmation dialogs

Auto-accept EVERY native browser dialog raised in this scenario.

Given I do not accept any confirmation dialogs

Auto-dismiss EVERY native browser dialog raised in this scenario.

Back to all step groups