Waitforcondition

Runs the specified JavaScript snippet repeatedly until it evaluates to "true". The snippet may have multiple lines, but only the result of the last line will be considered.

Note that, by default, the snippet will be run in the runner's test window, not in the window of your application. To get the window of your application, you can use the JavaScript snippet selenium.browserbot.getCurrentWindow(), and then run your JavaScript in there

Required Attributes
script
the javascript to execute in the browser
timeout
the amount of time in milliseconds to wait for a page to load after which an error will be thrown and the current execution would terminate.
Usage Examples
Example #1
<selenium baseurl="http://www.yahoo.com" browser="*${browser}">
   
<open url="/" />
   
<refresh />
   
<waitForCondition script="selenium.browserbot.getCurrentWindow().document.getElementById('search-submit')" timeout="30000" />
</selenium>