Method: PageObject#wait_until

Defined in:
lib/page-object.rb

#wait_until(timeout = PageObject.default_page_wait, message = nil, &block) ⇒ Object

Wait until the block returns true or times out

Examples:

@page.wait_until(5, 'Success not found on page') do
  @page.text.include? 'Success'
end

Parameters:

  • amount of time to wait for the block to return true.

  • message to include with the error if we exceed the timeout duration.

  • the block to execute. It should return true when successful.



184
185
186
# File 'lib/page-object.rb', line 184

def wait_until(timeout = PageObject.default_page_wait, message = nil, &block)
  platform.wait_until(timeout, message, &block)
end