Unable to find the chromedriver executable

37,548

Solution 1

Please download the server from http://code.google.com/p/chromedriver/downloads/list and place it somewhere on your PATH. More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver.

UPD: Link that is not broken: https://sites.google.com/a/chromium.org/chromedriver/downloads

Solution 2

For other people on MacOS:

brew cask install chromedriver

And you'll be good to go.

If using Homebrew 2.6.0 (released in 2020.12.01) or above, you should use:

brew install --cask chromedriver

Solution 3

For Linux/Ubuntu users, only running the following command should be sufficient:

sudo apt-get install chromium-chromedriver 

It takes care of addition the binary file to PATH as well.

Solution 4

I am considering Ruby on Rails features tests. Steps to add chromedriver to selenium webdrivers initialization:

1) Download lastest chrome executable from https://sites.google.com/a/chromium.org/chromedriver/downloads

2) Declare webdriver path in rails spec helper as (For selenium 3.x)

Selenium::WebDriver::Chrome.driver_path = "/home/jazz/Desktop/web_drivers/chromedriver"

and this should be before driver initialization like Capybara::Selenium::Driver.new(app, :browser => :chrome)

For above 3.x, just pass driver path during initialization-

Capybara::Selenium::Driver.new(app, :browser => :chrome,:driver_path => <path to chromedriver>)

All set. Load any feature spec in rails.It will open a chrome window.

Solution 5

It also will work to add an environment variable named webdriver.chrome.driver.

set webdriver.chrome.driver to whatever the absolute path is.

Share:
37,548

Related videos on Youtube

user2969455
Author by

user2969455

Updated on May 11, 2022

Comments