How to handle the Javascript alert in Selenium Webdriver?
Use the Below Code:
Alert alert = driver.switchTo().alert();
alert.accept(); //For Clicking OK
//alert.cancel(); For Clicking CANCEL
No comments:
Post a Comment