Dismiss a confirmation dialog
Medium70 pts~25 min
- Confirm dialogs
- Alerts
Practice app · UI Widgets Lab
Native alerts, confirm and prompt dialogs, a modal, a cookie banner, custom dropdown, autocomplete, date picker and tooltip.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Cancel a native confirm dialog and verify the app registered the cancel.
Your task
- 1Open TEST_URL and click
#confirm-button. - 2Switch to the confirm and assert its text is “Delete this item?”.
- 3Dismiss it.
- 4Assert
#confirm-resultshows “You clicked Cancel”.
Acceptance criteria
- The dialog is dismissed
#confirm-resultshows “You clicked Cancel”- At least 2 assertions pass
Selenium WebDriver 4 · Selenium · Dropdowns, alerts & popups