1
votes

I'm developing automated tests with Capybara on ruby. And I'm struggling to solve this error for days. I've tried to change chrome/chromedriver versions to every combination on earth and still getting errors! I've also reinstalled cucumber/ruby/devkit etc..

By the way, my automated tests were working pretty well, and suddenly they were not anymore.

Someone helps please!

C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.3/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok': session not created exception (Selenium::WebDriver::Error::SessionNotCreatedError)
from disconnected: Unable to receive message from renderer
  (Session info: chrome=54.0.2840.71)
  (Driver info: chromedriver=2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30),platform=Windows NT 10.0.10586 x86_64)

    require 'capybara'
    require 'selenium-webdriver'

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

    Selenium::WebDriver::Chrome.driver_path = 'C:\tools\chromedriver.exe'
    Selenium::WebDriver::Chrome.path = 'C:\tools\chrome64_54.0.2840.71\chrome.exe'

    Capybara.default_driver = :selenium

    url = "https://github.com/jnicklas/capybara"
    internet = Capybara::Session.new(:selenium)
    internet.visit url

    sleep(20)

1
You need to show your current configuration for anyone to have any chance of answering this. - Thomas Walpole
I'm using Windows 10 x64, Ruby 2.3.3p222. Capybara 2.7.1, Selenium WebDriver 3.0.3. Chrome 55.0.2883.75 m. - Rodolfo Marcos
Sorry, I meant your Capybara config - although if you're using selenium 3.x you'll want to update capybara to something newer than 2.7.1 - Thomas Walpole
I just upgraded Capybara to (2.11.0) and nothing yet. - Rodolfo Marcos
And add your current capybara configuration code to the question please - Thomas Walpole

1 Answers

1
votes

I would suggest try downgrading your Chrome version to v54 or v50 and try then. From your error log it seems a http request is not being established and so the webdriver is unable to create a session. Integrate a Selenium standalone server in your project and try running the tests then. The latest version is v3.0.1, you can download it from here:

http://www.seleniumhq.org/download/