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 are the different methods to refresh a web page in webdriver?
How to pass parameters using testng.xml?
How you are integrating cucumber feature files with step files?
What is the command to insert text into the HTML text box using Selenium?
How to run a group of test cases using testng?
What is the alternate way to click on the login button?
What are the advantages of page object model framework?
How to run selenium webdriver test from the command line?
Do you know how to mouse hover an element in selenium?
What is the difference between driver.get() and driver.navigate.to()
Do you know what are the main advantages of selenium grid?
What difference do you make between soft vs. Hard to say in selenium?
Which webdriver implementation claims to be the fastest?
How to handle a dropdown in selenium webdriver?
What is the difference between driver.findelement() and driver.findelements() commands?