ruby-on-railsrubyselenium-webdriverselenium-chromedrivercapybara

Error while using Chromedriver in Ruby on Rails


I need to test a project with capybara, selenium webdriver and chromedriver-helper, but I always get the following error message.

Selenium::WebDriver::Error::SessionNotCreatedError:
   session not created: This version of ChromeDriver only supports Chrome version 80

Curren Versions: capybara - 2.15.4 selenium-webdriver - 3.13.0 chromedriver-helper - 2.0.0

I tried to use other versions of all this gems, but I don't get the error fixed.


Solution

  • Here's my gemfile to use google-chrome successfully:

    gem 'capybara'
    gem 'selenium-webdriver'
    gem 'webdrivers', '~> 4.0'
    

    Webdrivers gem will automatic download chromedriver that corresponds you your chrome version. Here is the link to gem. Hope it will help you