2
votes

I am using gems capybara (2.0.2) cucumber (1.2.1) selenium-webdriver (2.29.0)

and in my env.rb

Capybara.register_driver :selenium do |app|
    Capybara::Selenium::Driver.new(app, :browser => :chrome)
end

Capybara.javascript_driver = :selenium_chrome

Its open blank new chrome tab in existing chrome window then my test cases is giving error.

end of file reached (EOFError)

but my test cases is working fine with firefox.

2
Show a full backtrace, pleaseAndrei Botalov
I think you need to change that last line: Capybara.javascript_driver = :seleniumRobertH

2 Answers

0
votes

Here's a support file gist that will get you all you need and more for your javascript/selenium/webkit/headless setup.

0
votes

try this out:

Capybara.register_driver :selenium do |app|
  require 'selenium-webdriver'
  profile = Selenium::WebDriver::Firefox::Profile.from_name 'selenium'
  capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile)
  Capybara::Selenium::Driver.new(app, { :browser => :remote, :desired_capabilities => capabilities })
end