Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you handle Alerts and Pop Ups?

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


Please Help Members By Posting Answers For Below Questions

Write a code snippet to launch chrome browser in webdriver.

977


Is selenium capable of handling windows pop-ups?

1040


For database testing in selenium webdriver what api is required?

900


Which selenium command(s) simulates selecting a link?

4010


Could you explain the line of code webdriver driver = new firefoxdriver()?

967


How is driver.close()command different from driver.quit command?

1056


Explain the meaning of assertion in selenium and what are the types of assertion?

1006


Does the selenium have any limitations?

1063


What are the different types of web controller APIs supported in Selenium?

1143


How can we move to a particular frame in selenium?

1079


How to switch to a new window (new tab) which opens up after you click on a link?

1035


when autoit is used?

960


Which are the commands used for capturing the bitmaps?

1113


What is implicit wait in selenium webdriver?

1168


Why to use testng with selenium rc?

1018