class Selenium::WebDriver::Options

Constants

SECONDS_PER_DAY

Public Class Methods

new(bridge) click to toggle source

@api private

# File lib/selenium/webdriver/common/options.rb, line 9
def initialize(bridge)
  @bridge = bridge
end

Public Instance Methods

all_cookies() click to toggle source

Get all cookies

@return [Array<Hash>] list of cookies

# File lib/selenium/webdriver/common/options.rb, line 76
def all_cookies
  @bridge.getAllCookies.map do |cookie|
    {
      :name    => cookie["name"],
      :value   => cookie["value"],
      :path    => cookie["path"],
      :domain  => cookie["domain"] && strip_port(cookie["domain"]),
      :expires => cookie["expiry"] && datetime_at(cookie['expiry']),
      :secure  => cookie["secure"]
    }
  end
end
delete_all_cookies() click to toggle source

Delete all cookies

# File lib/selenium/webdriver/common/options.rb, line 66
def delete_all_cookies
  @bridge.deleteAllCookies
end
timeouts() click to toggle source
# File lib/selenium/webdriver/common/options.rb, line 89
def timeouts
  @timeouts ||= Timeouts.new(@bridge)
end