1
votes

I'm using Cucumber with Capybara and Selenium-Webdriver. Until now, I've always used Chrome but the project has requested some cross browser tests for Firefox too.

When running in Firefox, I just get a blank window and webpage doesn't appear.

This is the error I get:

Selenium::WebDriver::Error::WebDriverError: no sessionId in returned payload

My setup is:

Firefox V54
Cucumber 2.4
Selenium-webdriver 3.4.0
geckodriver 0.17

My firefox profile:

if ENV['firefox']
  Capybara.default_driver = :selenium
  Capybara.register_driver :selenium do |app|
    options = {
        :js_errors => false,
            }
    Capybara::Selenium::Driver.new(app, :browser => :firefox)
  end

Any ideas why I only get a blank window when Firefox starts up in the test?

1
check github.com/SeleniumHQ/selenium/issues/3621 . "The 3.0.5 error is because of firefox updating to 52. AFAIK capybara does not install geckodriver. Sounds like you'll need to force install the latest version of geckodriver as well"thefabbulus

1 Answers

1
votes

You claim to be running geckodriver v0.17 (which should work with the other versions you list) however that error would imply you're not. Try running bundle exec geckodriver --version and seeing what it returns. I'm guessing you've got a gem installed that attempts to manage the download of geckodriver and an older version is actually being used when you run your tests. If that is the case check with the specific gem documentation on how to update the installed geckodriver.