Waiting for an element to disappear 06/08/2012
# Wait while the element, in this case a link, is present on the page.
# The timeout is by default 30 seconds.
browser.link(:id => '<link_id>').wait_while_present

Sometimes it is useful to wait until an element disappears from the page. That can be achieved with the code above.

Waiting with a block 06/08/2012
# Waiting until a condition in the block is true. In this case until a DIV with ID of 
# navigation to be visible.
Watir::Wait.until {
  browser.div(:id => 'navigation').visible?

# A timeout can be provided here too
Watir::Wait.until(10) {
  browser.div(:id => 'navigation').visible?

You can define a block to wait for specific conditions, which by default timeouts after 30 seconds. This can be useful when waiting an element in some other part of the page before acting on an element.

Waiting for elements to be present 06/08/2012
# Click on the link only when it's present. Timeouts after 30 seconds by default
browser.link(:id => '<link_id>').when_present.click 

# Wait no more than 5 seconds for the element to be available
browser.link(:id => '<link_id>').when_present(5).click 

There are multiple ways to wait for an element to be present on a page. Webdriver waits for elements by default for a configurable amount of time. To have a specific wait time for an element, the approach above can be used.