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
Write a code snippet to launch chrome browser in webdriver.
Is selenium capable of handling windows pop-ups?
For database testing in selenium webdriver what api is required?
Which selenium command(s) simulates selecting a link?
Could you explain the line of code webdriver driver = new firefoxdriver()?
How is driver.close()command different from driver.quit command?
Explain the meaning of assertion in selenium and what are the types of assertion?
Does the selenium have any limitations?
What are the different types of web controller APIs supported in Selenium?
How can we move to a particular frame in selenium?
How to switch to a new window (new tab) which opens up after you click on a link?
when autoit is used?
Which are the commands used for capturing the bitmaps?
What is implicit wait in selenium webdriver?
Why to use testng with selenium rc?