Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

0
how to handle alerts in selenium webdriver java

Solved 1 Answers 127 Views Selenium
0 1
How do I handle alerts in Selenium WebDriver Java, especially the alerts which occurs unexpectedly.

1 Answer

0
Best answer
0
To handle alert you can use below code.

driver.switchTo().alert().accept();
answered by (327 points)
selected by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...