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 is the difference between @factory and @data provider annotation?
Explain how you can switch back from a frame?
Just how much does selenium license cost per customer device?
Other than the default port 4444 how you can run selenium server?
What is the difference between driver.get() and driver.navigate.to()
What are the advantages and disadvantages of using selenium as testing tool?
Can we use selenium rc for tests driving on two different browsers on one operating system without selenium grid?
How to clear the text in the text box using selenium webdriver?
What is testng?
How you can login into any site if it’s showing any authentication popup for password and username?
When we use findElement () and findElements () findElement ()?
What test can selenium do?
What is the difference between “type” and “typeandwait” command?
What is the main difference between the close() and quit() methods?
What are the steps to run automation using selenium?