Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver

11,623
gem install webdrivers

Worked for me.

Share:
11,623

Related videos on Youtube

Glen
Author by

Glen

Student at Turing.IO

Updated on June 04, 2022

Comments

  • Glen
    Glen almost 2 years

    In irb I do the following:

    require "watir"
    b = Watir::Browser.new :chrome
    

    I then get the following error:

    Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515
    

    OSX 10.12.3 Ruby 2.3.1 Chrome Driver latest version Watir 6.2.0

    • max pleaner
      max pleaner about 7 years
      you need to download the driver, see stackoverflow.com/questions/27719345/…
    • titusfortner
      titusfortner about 7 years
      you can gem install webdrivers and it will automatically keep your system up to date with the latest version of any driver being used
    • anka
      anka almost 6 years
      We had to hand over the path to the chromedriver bin when using it on heroku. See my detailed answer here stackoverflow.com/a/50781946/135160