I'm working in Selenium and want to click on an alert box or confirmation through Selenium code in Eclipse. How can I do this?
1 Answer
Alert alert = driver.switchTo().alert();
alert.accept();
On Pavel's suggestion adding the issue I faced with this -
http://code.google.com/p/selenium/issues/detail?id=3544
Note: The issue is random and the code worked for me most of the time. :)
2 Comments
some_other_guy
But there are other issues that you might face.
Pavel Janicek
If there are other issues, write it to your answer :)