Method: Selenium::Client::GeneratedDriver#wait_for_condition

Defined in:
lib/selenium/client/legacy_driver.rb

#wait_for_condition(script, timeout) ⇒ Object

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

‘script’ is the JavaScript snippet to run ‘timeout’ is a timeout in milliseconds, after which this command will return with an error



1398
1399
1400
# File 'lib/selenium/client/legacy_driver.rb', line 1398

def wait_for_condition(script,timeout)
    remote_control_command("waitForCondition", [script,timeout,])
end