In Selenium WebDriver, testing pop-up windows involves identifying a pop-up window, switching the driver context to the pop-up window, then executing steps on the pop-up window, and finally switching back to the parent window.
The Selenium WebDriver allows us to identify a pop-up window by its
name attribute or window handle and switching between the pop-up window and the browser window is done using the
In this recipe, we will identify and handle a pop-up window by using its
name attribute. Developers provide the
name attribute for a pop-up window that is different from its title. In the following example, a user can open a pop-up window by clicking on the ...