1
votes

I set up Cucumber+Webrat+Selenium according to this article. Whenever I run my server, though, I keep getting: ERROR Server Exception: sessionId should not be null; has this session been started yet? (Selenium::CommandError)

Two hours on Google haven't done much for me. Could you please help out? Thanks! I am working on Ruby 1.8.7 and Rails 2.3.5 on Mac OS X 10.6. My installed gems in test.rb are:

config.gem "database_cleaner", :lib => false, :version => ">=0.5.0"
config.gem "rspec", :lib => false, :version => ">=1.2.2"  
config.gem "rspec-rails", :lib => false, :version => ">=1.2.2"  
config.gem "webrat", :lib => false, :version => ">=0.4.4"
config.gem "cucumber", :lib => false, :version => ">=0.3.0"  
config.gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => "http://gems.github.com"
config.gem "pickle", :lib => false, :version => ">= 0.1.21"

Thank you very much!

1

1 Answers

2
votes

add this line in your testing environment file in config/environments folder for example: cucumber.rb or test.rb

Here is the setting: config.action_controller.session = { :session_http_only => false }

This should fix the issue