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 b/w close () and quit ()?
How to export selenium ide test suite to selenium rc suites?
Explain what is the main difference between web-driver and rc?
What is the purpose of the getoptions() method?
How will you handle working with multiple windows in selenium?
How to scroll down to a particular element?
How will you find an element using selenium?
Explain me how can we capture screenshots in selenium?
Explain how you can find broken images in a page using selenium web driver?
What are the types of waits available in selenium webdriver?
Disadvantages of Hybrid Framework?
How colors could be handled in selenium webdriver?
If one wanted to display the value of a variable named answer in the log file, what would the first argument to the previous command look like?
How to change the url on a webpage using selenium web driver?
When do we use findelement() and findelements()?