Method: Watir::Wait.until
- Defined in:
- lib/watir/wait.rb
.until(timeout: nil, message: nil, interval: nil, object: nil) ⇒ Object
Waits until the block evaluates to true or times out.
37 38 39 40 41 42 43 44 |
# File 'lib/watir/wait.rb', line 37 def until(timeout: nil, message: nil, interval: nil, object: nil) timeout ||= Watir.default_timeout run_with_timer(timeout, interval) do result = yield(object) return result if result end raise TimeoutError, (timeout, object, ) end |