Method: Selenium::WebDriver::Options#cookie_named

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

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.

[View source]

48
49
50
# File 'lib/selenium/webdriver/common/options.rb', line 48

def cookie_named(name)
  all_cookies.find { |c| c[:name] == name }
end