Class: Watir::WhenPresentDecorator

Inherits:
BaseDecorator show all
Defined in:
lib/watir/legacy_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_missing?

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)

31
32
33
34
35
36
# File 'lib/watir/legacy_wait.rb', line 31

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