How To Sync Applications With Selenium Execution
In this post we will see how to sync the selenium test execution with Webpage. Webpage loading depends on the network connection and speed.
The static pages or weldefined pages takes times to load. But like any other tools Selenium executes steps very fast. To make it sync with web page loading.
Selenium has given two options..
1. Either go to default option in the IDE,Options->Options->General Tab->Default Timeout
change the default time out option.
or
2. If you are using some Editor other than Selenium IDE like Eclipse,then you can use
thread.sleep(timeout time)
More sophisticated options are also there..
waitForAlertNotPresent
waitForAlertPresent
waitForElementPresent
waitForElementNotPresent
waitForTextPresent
waitForTextNotPresent
waitForPageToLoad
waitForFrameToLoad
Ajax even though lightweight takes some times to transfer the data via JSON ,
That time this techniques will come handy.