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
How do you get the current page url?
Explain xpath absolute and xpath attributes.
Explain how you can find broken images in a page using selenium web driver?
Firefox driver is class or an interface and from where is it inherited?
What is the super interface of webdriver?
While injecting capabilities in webdriver to perform tests on a browser which is not supported by a webdriver what is the limitation that one can come across?
What is the difference between single and double slash in xpath?
What are the types of waits available in selenium webdriver?
How can we clear a text written in a textbox?
How to execute a single line command from selenium ide?
How are selenium ide, webdriver and selenium rc different from each other?
What is regular expressions? How you can use regular expressions in selenium?
How to upload a file in selenium webdriver?
What’s selenese?
Explain the different exceptions in selenium webdriver.