RE: Alert popup

HI all

how to handle alert popup ok and close?

help me the solution

sarbashree Default Asked on January 13, 2015 in Selenium WebDriver.
Add Comment
1 Answers

hi  Sarbashree,

code in webdriver

Alert alt= driver.switchTo().alert();
alt.accept(); // it is for ok  button


Alert alt= driver.switchTo().alert();
alt.dismiss(); // it is for cancel  button

Train Answered on January 14, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.