I am running Capybara 1.1.2 with Poltergeist 1.0.1 for headless testing. The test runs fine with selenium driver. However with poltergeist, the site snapshot states that cookies are disabled. Am I missing any config. Shouldn't cookies be enabled by default?
Asked
Active
Viewed 1,107 times
1 Answers
1
You can make sure that the cookies are enabled in Capybara before setting the session.
Capybara.register_driver :my_firefox_driver do |app|
Capybara::Poltergeist::Driver.new(app, {:js_errors => false,
:cookies => true, :window_size => [1280, 1024]})
end
self.session = Capybara::Session.new(:my_firefox_driver)
-
That's not the correct answer in the context my question was. Cookies are already enabled. – 3coins Jun 21 '13 at 16:33