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.