Dialogs examples
accept and dismiss browser dialogs as .stk files
Arm the dialog before the step that opens it. The quoted string matches a fragment of the dialog message.
Accept confirm
Platform: web
Group: Dialogs
Scenario: Confirm delete
Given I navigate to "$BASE_URL/items"
When I accept "Are you sure?"
And I click on "Delete"
Then I should not see "Laptop"
And I should see "Deleted"Dismiss alert
Platform: web
Group: Dialogs
Scenario: Dismiss session warning
Given I navigate to "$BASE_URL/account"
When I dismiss "Session expired"
And I click on "Logout"
Then I should be on "/login"