You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
Hello
I'm using Ruby/Capybara/Cucumber and Selenium Webdriver to control Chrome Browser,
but add_cookie does not work.
Ruby code :
browser = Capybara.current_session.driver.browser
browser.manage.add_cookie :name => "cookie_name", :value => "cookie_value"
The cookie should be set but it doesn't.
I get this error on the console :
Internal Chrome error during 'SetCookie': (Could not set the cookie). Request details:
({"command":"SetCookie","cookie":{"na
me":"cookie_name","path":"/","secure":false,"value":"cookie_value"},"url":"about:blank"}).
(Selenium::WebDriver::Error::UnhandledError)
OS : Windows XP SP3 x86
Browser: Google Chrome 15.0.874.120 m
GEMs :
Using selenium-webdriver (2.12.2)
Using capybara (1.1.1)
Using gherkin (2.6.4)
Using cucumber (1.1.2)
Using rspec-core (2.7.1)
Using rspec-expectations (2.7.0)
Using rspec-mocks (2.7.0)
Using rspec (2.7.0)
Reported by geoffroy.montel.ml on 2011-11-14 13:21:05
The text was updated successfully, but these errors were encountered:
Wooops. Thanks a lot. For those who encounter the problem, you have to visit the URL
you want to store the cookie at before.
In capybara, do that :
visit('/')
browser = Capybara.current_session.driver.browser
browser.manage.add_cookie :name => "cookie_name", :value => "cookie_value"
Reported by geoffroy.montel.ml on 2011-11-15 13:06:35
Originally reported on Google Code with ID 2835
Reported by
geoffroy.montel.ml
on 2011-11-14 13:21:05The text was updated successfully, but these errors were encountered: