Class: ShowMeTheCookies::Selenium

Inherits:
Object
  • Object
show all
Defined in:
lib/show_me_the_cookies/selenium.rb

Instance Method Summary collapse

Constructor Details

#initialize(driver) ⇒ Selenium

Returns a new instance of Selenium.



2
3
4
5
# File 'lib/show_me_the_cookies/selenium.rb', line 2

def initialize(driver)
  @browser = driver.browser
  self
end

Instance Method Details



11
12
13
# File 'lib/show_me_the_cookies/selenium.rb', line 11

def delete_cookie(cookie_name)
  @browser.manage.delete_cookie(cookie_name)
end

#show_me_the_cookiesObject



7
8
9
# File 'lib/show_me_the_cookies/selenium.rb', line 7

def show_me_the_cookies
  @browser.manage.all_cookies.map(&:inspect).join("\n")
end