Posted By

noah on 07/01/09


javascript js test ruby BDD client TDD selenium unit idiomatic

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Waiting for events with the Selenium-Client Ruby driver

 / Published in: Ruby


List of commonly used wait_for commands

For convenience, here are direct links to the documentation of the Selenium-Ruby wait_for commands that are most often used. The documentation of WaitFor commands in Selenium Core may also be of interest.

  1. wait_for_condition
  2. wait_for_element
  3. wait_for_field_value
  4. wait_for_frame_to_load
  5. wait_for_no_element
  6. wait_for_no_field_value
  7. wait_for_no_text
  8. wait_for_page
  9. wait_for_page_to_load
  10. wait_for_popup
  11. wait_for_text
Where to find the documentation

More information onwait_for with the Ruby client, including a complete list of the wait_for commands available in the Ruby client, is to be found in the documentation for the Selenium-Client Ruby Gem. As Selenium-Client defines many "idiomatic" Ruby aliases for built-in Selenium methods, it will probably be especially helpful to become familiar with the Selenium Ruby driver command set as well as Selenium-Client's Idiomatic Ruby command set.

It may also be helpful to refer to the documentation for Selenium Core with regard to WaitForCondition and related commands. In general the Selenium Core documentation tends to provide more insight into how commands work, than does the documentation for any of the drivers.


Below are a couple of examples of using Selenium's wait_for family of commands with the Ruby driver (Selenium-Client).

One item of note is that , within wait_for_condition, one does not need to use this.browserbot.getCurrentWindow() to access the DOM of the AUT

Report this snippet  

You need to login to post a comment.