Selenium waitforpopup


How to stop the selenium server until a popup opens?
We have selenium.waitForPageToLoad to stop the server until the Page Loads. But is there any way to stop it for Popup?
If you are dealing with a direct popup then You can use 
selenium.WaitForPopUp("id=popup_container", "30000");

to stop the server until popup Opens. 

But what will you do if your popup is a div tag like seen in this  DEMO?


If your 'popup' is not actually a popup, it's just a div tag. So you have to wait until that element (div tag) is present. There is a method to check if the element is present:
selenium.IsElementPresent("div_id_of_the_popup");
This is the way to stop the selenium server until a div_popup Opens.

5 comments:

  1. Really nice post. SEO is one of the digital marketing techniques used for improve the website ranking in search engine result page. To know more details please call 9003623340.
    Regards..
    SEO Course in Chennai

    ReplyDelete
  2. Cloud computing is storing and accessing the large data sets over the internet instead of your PC computer. So that you can manage the data and program anywhere through the internet.
    Regards..
    Cloud Computing Training in Chennai

    ReplyDelete
  3. very informative blog. Helps to gain knowledge about new concepts and techniques. Thanks for posting information in this blog
    Salesforce Training in Chennai

    ReplyDelete
  4. This is really a great post. Thank you for taking time to provide us some of the useful and exclusive information with us. Keep on blogging!!

    Cloud Computing Training in Chennai

    ReplyDelete
  5. Angular JS is a structural framework for dynamic web application and angular's data binding eliminates much of the code that you would otherwise write it.
    Angularjs Training in Chennai | Angularjs training Chennai

    ReplyDelete