Module | Selenium::Client::Extensions |
In: |
lib/selenium/client/extensions.rb
|
Convenience methods not explicitely part of the protocol
These for all Ajax request to finish (Only works if you are using prototype, the wait happens in the browser)
See davidvollbracht.com/2008/6/4/30-days-of-tech-day-3-waitforajax for more background.
Wait for all Prototype effects to be processed (the wait happens in the browser).
Credits to github.com/brynary/webrat/tree/master
Wait for some text to NOT be present (the wait happens in the browser).
See wait_for_text for usage details.
Wait for some text to be present (the wait is happening browser side).
wait_for_text will search for the given argument within the innerHTML of the current DOM. Note that this method treats a single string as a special case.
wait_for_text accepts an optional hash of parameters:
In addition to plain strings, wait_for_text accepts regular expressions as the pattern specification.
The following are equivalent, and will match "some text" anywhere within the document:
wait_for_text "some text" wait_for_text /some text/
This will match "some text" anywhere within the specified element:
wait_for_text /some text/, :element => "container"
This will match "some text" only if it exactly matches the complete innerHTML of the specified element:
wait_for_text "some text", :element => "container"