Class: Selenium::WebDriver::W3COptions

Inherits:
Options
  • Object
show all
Defined in:
lib/selenium/webdriver/common/w3c_options.rb

Instance Method Summary collapse

Methods inherited from Options

#add_cookie, #all_cookies, #delete_cookie, #initialize, #logs, #timeouts, #window

Constructor Details

This class inherits a constructor from Selenium::WebDriver::Options

Instance Method Details

Get the cookie with the given name

Parameters:

  • name (String)

    the name of the cookie

Returns:

  • (Hash, nil)

    the cookie, or nil if it wasn’t found.



31
32
33
# File 'lib/selenium/webdriver/common/w3c_options.rb', line 31

def cookie_named(name)
  convert_cookie(@bridge.cookie(name))
end

#delete_all_cookiesObject

Delete all cookies



39
40
41
# File 'lib/selenium/webdriver/common/w3c_options.rb', line 39

def delete_all_cookies
  @bridge.delete_all_cookies
end