seleniumonlinetutor

Selenium Interview : How do you handle alert pop-up in Selenium?

How do you handle alert pop-up in Selenium ? Answer: In Selenium webDriver, to handle alert pop-ups, we first need to switch control to alert pop-ups then click on ok or cancel button available on alert then move control back to main page. The sample code is follows: String mainPage = driver.getWindowHandle();   Alert myAlert= […]

Read More »