>Waiting for a page to load while writing selenium scripts is pretty straightforward using the
selenium.WaitForPageToLoad(“timeout”) timeout is time in millisecond.
Sometimes using this command doesn’t work, especially when you the whole page is not loaded or reloaded but a popup is loaded in a div on the page. In situation like this i would used the
selenium.WaitForCondition(“ScriptToReturnwhich ReturnTrue OrFalse“, “timeout”);
e.g. of scripts would be
.getElement ById(‘idOfElement ToBelocated’)!=null”, “60000”);
what worked for me after several hours of trying is:
.frames[‘Name Of IFrame’].document.get Element ById
‘idOfElement ToBelocated’)!= null”, “60000”);
This brilliantly eliminated my nightmare …….
Comments are welcome