Handle Confirm Dialog
A confirm dialog has OK and Cancel buttons. Use dialog.dismiss() to click Cancel.
On the Alerts page, clicking "Show Confirm" triggers a confirm dialog. The result is shown in a #confirmResult element.
Task:
- Navigate to
https://testkru.com/Interactions/Alerts - Set up handler to dismiss (cancel) the dialog
- Click "Show Confirm"
- Print the result text from
#confirmResult
Expected output:
Dialog type: confirm Result: You clicked: Cancel
TestKru