lib/watir/legacy_wait.rb in watir-6.14.0 vs lib/watir/legacy_wait.rb in watir-6.15.0
- old
+ new
@@ -14,11 +14,11 @@
end
def method_missing(method, *args, &block)
return super unless @element.respond_to?(method)
- Watir::Wait.until(@timeout, @message) { wait_until }
+ Wait.until(@timeout, @message) { wait_until }
@element.__send__(method, *args, &block)
end
end
@@ -27,13 +27,13 @@
# put on hold until the element is present (exists and is visible) on the page.
#
class WhenPresentDecorator < BaseDecorator
def present?
- Watir::Wait.until(@timeout, @message) { wait_until }
+ Wait.until(@timeout, @message) { wait_until }
true
- rescue Watir::Wait::TimeoutError
+ rescue Wait::TimeoutError
false
end
private
@@ -83,11 +83,11 @@
timeout ||= Watir.default_timeout
message = "waiting for #{selector_string} to become present"
if block_given?
- Watir::Wait.until(timeout, message) { present? }
+ Wait.until(timeout, message) { present? }
yield self
else
WhenPresentDecorator.new(self, timeout, message)
end
end
@@ -110,10 +110,10 @@
timeout ||= Watir.default_timeout
message = "waiting for #{selector_string} to become enabled"
if block_given?
- Watir::Wait.until(timeout, message) { enabled? }
+ Wait.until(timeout, message) { enabled? }
yield self
else
WhenEnabledDecorator.new(self, timeout, message)
end
end