Class: Selenium::WebDriver::W3CManager

Inherits:
Manager
  • Object
show all
Defined in:
lib/selenium/webdriver/common/w3c_manager.rb

Instance Method Summary collapse

Methods inherited from Manager

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

Constructor Details

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

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_manager.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_manager.rb', line 39

def delete_all_cookies
  @bridge.delete_all_cookies
end