Handling a confirm and prompt alert box
A confirm box is often used to verify or accept something from the user. When a confirm alert is displayed, the user will have to click on either the OK or the Cancel button to proceed, as shown in the following screenshot:
If the user clicks on the OK button, the confirm box returns a true
value response. If the user clicks on the Cancel button, then it returns false
.
The prompt alert box
A prompt box is often used to accept a value from a user. When a prompt box pops up, the user will have to enter a value and click on either the OK or the Cancel button to proceed, as shown in the following screenshot:
If the ...
Get Selenium Testing Tools Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.