Method: Selenium::WebDriver::Wait#initialize

Defined in:
lib/selenium/webdriver/common/wait.rb

#initialize(opts = {}) ⇒ Wait

Create a new Wait instance

Parameters:

  • opts (Hash) (defaults to: {})

    Options for this instance

Options Hash (opts):

  • :timeout (Numeric) — default: 5

    Seconds to wait before timing out.

  • :interval (Numeric) — default: 0.5

    Seconds to sleep between polls.

  • :message (String)

    Exception mesage if timed out.

[View source]

16
17
18
19
20
# File 'lib/selenium/webdriver/common/wait.rb', line 16

def initialize(opts = {})
  @timeout  = opts.fetch(:timeout, DEFAULT_TIMEOUT)
  @interval = opts.fetch(:interval, DEFAULT_INTERVAL)
  @message  = opts[:message]
end