Class: Watir::WhenPresentDecorator

Inherits:
BaseDecorator show all
Defined in:
lib/watir-webdriver/wait.rb

Overview

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.

Instance Method Summary collapse

Methods inherited from BaseDecorator

#initialize, #method_missing, #respond_to?

Constructor Details

This class inherits a constructor from Watir::BaseDecorator

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Watir::BaseDecorator

Instance Method Details

#present?Boolean

Returns:

  • (Boolean)

126
127
128
129
130
131
# File 'lib/watir-webdriver/wait.rb', line 126

def present?
  Watir::Wait.until(@timeout, @message) { wait_until }
  true
rescue Watir::Wait::TimeoutError
  false
end