Method: Selenium::Client::Idiomatic#wait_for_page
- Defined in:
- lib/selenium/client/idiomatic.rb
#wait_for_page(timeout_in_seconds = nil) ⇒ Object Also known as: wait_for_page_to_load
Waits for a new page to load.
Selenium constantly keeps track of new pages loading, and sets a “newPageLoaded” flag when it first notices a page load. Running any other Selenium command after turns the flag to false. Hence, if you want to wait for a page to load, you must wait immediately after a Selenium command that caused a page-load.
-
‘timeout_in_seconds’ is a timeout in seconds, after which this command will return with an error
44 45 46 47 |
# File 'lib/selenium/client/idiomatic.rb', line 44 def wait_for_page(timeout_in_seconds=nil) remote_control_command "waitForPageToLoad", [actual_timeout_in_milliseconds(timeout_in_seconds),] end |