class Watir::WhenPresentDecorator

Wraps an Element so that any subsequent method calls are put on hold until the element is present (exists and is visible) on the page.

Public Instance Methods

present?() click to toggle source
# File lib/watir/legacy_wait.rb, line 31
def present?
  Wait.until(@timeout, @message) { wait_until }
  true
rescue Wait::TimeoutError
  false
end

Private Instance Methods

wait_until() click to toggle source
# File lib/watir/legacy_wait.rb, line 40
def wait_until
  @element.present?
end