Class: Selenium::WebDriver::Timeouts
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Timeouts
- Defined in:
- rb/lib/selenium/webdriver/common/timeouts.rb
Instance Method Summary (collapse)
-
- (Object) implicit_wait=(seconds)
Set the amount of time the driver should wait when searching for elements.
-
- (Timeouts) initialize(bridge)
constructor
A new instance of Timeouts.
-
- (Object) page_load=(seconds)
Sets the amount of time to wait for a page load to complete before throwing an error.
-
- (Object) script_timeout=(seconds)
Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error.
Constructor Details
- (Timeouts) initialize(bridge)
Returns a new instance of Timeouts
5 6 7 |
# File 'rb/lib/selenium/webdriver/common/timeouts.rb', line 5 def initialize(bridge) @bridge = bridge end |
Instance Method Details
- (Object) implicit_wait=(seconds)
Set the amount of time the driver should wait when searching for elements.
13 14 15 |
# File 'rb/lib/selenium/webdriver/common/timeouts.rb', line 13 def implicit_wait=(seconds) @bridge.setImplicitWaitTimeout Integer(seconds * 1000) end |
- (Object) page_load=(seconds)
Sets the amount of time to wait for a page load to complete before throwing an error. If the timeout is negative, page loads can be indefinite.
32 33 34 |
# File 'rb/lib/selenium/webdriver/common/timeouts.rb', line 32 def page_load=(seconds) @bridge.setTimeout 'page load', Integer(seconds * 1000) end |
- (Object) script_timeout=(seconds)
Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, then the script will be allowed to run indefinitely.
23 24 25 |
# File 'rb/lib/selenium/webdriver/common/timeouts.rb', line 23 def script_timeout=(seconds) @bridge.setScriptTimeout Integer(seconds * 1000) end |