lib/watir/wait.rb in watir-6.1.0 vs lib/watir/wait.rb in watir-6.2.0

- old
+ new

@@ -119,11 +119,11 @@ if deprecated_message || deprecated_timeout warn "Instead of passing arguments into #wait_until, use keywords" timeout = deprecated_timeout message = deprecated_message end - message ||= "waiting for true condition on #{selector_string}" + message ||= "waiting for true condition on #{inspect}" Wait.until(timeout: timeout, message: message, interval: interval, object: self, &blk) self end @@ -145,11 +145,11 @@ if deprecated_message || deprecated_timeout warn "Instead of passing arguments into #wait_while method, use keywords" timeout = deprecated_timeout message = deprecated_message end - message ||= "waiting for false condition on #{selector_string}" + message ||= "waiting for false condition on #{inspect}" Wait.while(timeout: timeout, message: message, interval: interval, object: self, &blk) self end @@ -188,10 +188,13 @@ def wait_while_present(deprecated_timeout = nil, timeout: nil) if deprecated_timeout warn "Instead of passing arguments into #wait_while_present method, use keywords" timeout = deprecated_timeout end - wait_while(timeout: timeout, &:present?) + wait_while(timeout: timeout) do + self.reset! if self.is_a? Watir::Element + self.present? + end end end # Waitable end # Watir