Answer Posted / annasaheb
To Handle Alert
Alert alert = driver.switchTo().alert();
message = alert.getText();
alert.accept();//to accept alert
alert.dismiss();//to cancel alert
Is This Answer Correct ? | 19 Yes | 1 No |
Post New Answer View All Answers
What do you mean by the assertion in selenium?
What are the types of listeners in testng?
What is the main difference between the close() and quit() methods?
How is a statement different from verification?
What is parameterization in testng? How to pass parameters using testng.xml?
What is testng assert and list out some common assertions supported by testng?
What the webdriver supported mobile testing drivers do you know?
What are its advantages of pom?
Can captcha and bar code reader be automated by using selenium?
Is there a way for me to know all available options when I start selenium server?
How you can use recovery scenario with selenium?
What are soft assert and hard assert in selenium?
Mention what are the advantages of using git hub for selenium?
Mention why do you need session handling while working with selenium?
Mention what is intellij?