A prompt box is often used to input a value by the user before entering a page. When a prompt box pops up, the user will have to click either on the OK or the Cancel button to proceed after entering an input value, as shown in the following screenshot:
If the user clicks on the OK button, the box returns the input value. If the user clicks on the Cancel button, the box returns
In this recipe, we will handle a prompt box using the Selenium WebDriver's
We will create a test that handles a prompt box. We will enter text into the prompt box's input field and later verify if the same value is ...