How do you handle Alerts and Pop Ups?

Answer Posted / chetan phani.j

Alert popup
Alert a =driver.switchto().alert()
String text=a.getText().
syso(text);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I upload a file using selenium? I need to upload a word file during test execution.

471


How to assert title of the web page?

532


How to insert a start point in selenium ide?

500


Write a code to wait for a particular element to be visible on a page. Write a code to wait for an alert to appear.

740


what is the difference between driver.get() and driver.navigate.to(“url”)?

500






List out different types of locators?

491


Which are the browsers supported by selenium ide?

483


What are the different exceptions you have faced in selenium webdriver?

459


How to insert a comment in selenium ide?

648


What is the difference between “type” and “typeandwait” command?

1011


How to debug the tests in selenium ide?

534


What are heightened privileges browsers?

613


Using selenium how can you handle network latency?

525


How can we check if an element is getting displayed on a web page?

513


How can we move to nth child element using css selector?

490