Unable to find the chromedriver executable
Asked Answered
A

10

31

Unable to find the chromedriver executable. Please download the server from http://code.google.com/p/chromedriver/downloads/list and place it somewhere on your PATH. More info at http://code.google.com/p/selenium/wiki/ChromeDriver. (Selenium::WebDriver::Error::WebDriverError)

On Ubuntu 13 with Watir and Ruby.

Arise answered 8/11, 2013 at 15:10 Comment(0)
H
11

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

Halophyte answered 9/11, 2013 at 17:41 Comment(1)
"The page you asked for does not exist" bugs.chromium.org/p/chromedriver/downloads/listWinger
S
63

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
Sardinia answered 4/3, 2017 at 13:35 Comment(1)
for newer versions of brew you will just need "brew install chromedriver" instead of "brew cask install chromedriver"Paleethnology
H
11

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

Halophyte answered 9/11, 2013 at 17:41 Comment(1)
"The page you asked for does not exist" bugs.chromium.org/p/chromedriver/downloads/listWinger
H
10

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.

Hebraism answered 30/1, 2020 at 14:2 Comment(0)
H
3

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.

Hartung answered 31/10, 2017 at 17:15 Comment(0)
P
2

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

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

Purposeless answered 8/11, 2013 at 15:12 Comment(0)
M
2

For me what have worked was to download the chromedriver.exe based on my Chrome version and place it on my directory "C:/ruby/...bin/" I've tried to setup the environment variable but it didn't work at all.

Mollymollycoddle answered 26/4, 2020 at 18:42 Comment(0)
A
0

I have another solution worth trying:

in rails-helper.rb go to this line and change :firefox to :chrome

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

to

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

then, go to ChromeDriver and run this:

brew tap homebrew/cask && brew cask install chromedriver
Argument answered 7/11, 2018 at 5:33 Comment(0)
L
0

I had the same issue with Ruby and Watir. I have installed ChromeDriver according to this tutorial:

https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/

Then I had following error:

DevToolsActivePort file doesn't exist while trying to initiate Chrome Browser

In my case error was solved by adding the arguments --no-sandbox and --disable-dev-shm-usage to browser contructor:

args = ['--no-sandbox', '--disable-dev-shm-usage']
browser = Watir::Browser.new :chrome, options: {args: args}

Finally, everything works fine.

Louralourdes answered 28/1, 2019 at 19:39 Comment(0)
E
0

The Chrome Drive Path changed again. The new Path which has Chrome Driver for all versions:

Working Path

  1. https://chromedriver.storage.googleapis.com/index.html

  2. https://sites.google.com/chromium.org/driver/

Old Path - https://sites.google.com/a/chromium.org/chromedriver/downloads

Include below on your env.rb

Capybara.register_driver :chrome do |app|
  Capybara::Selenium::Driver.new(app,
    :browser => :chrome,
    :driver_path => "<PATH FOR UNZIPPED DRIVER FOLDER>"
  )
end
Earthling answered 12/1, 2022 at 18:8 Comment(0)
K
0

Windows :

  1. enter the link indicated in the error message https://chromedriver.storage.googleapis.com/index.htm
  2. download chrome driver
  3. copy the chromedriver.exe file
  4. go to the c:\windows folder
  5. paste the chromedriver.exe

your code will now work.

Mac:

  1. just enter cmd and type brew cask install chromedriver

your code will now work.

Linux:

  1. just enter cmd and type sudo cp chromedriver /usr/local/bin

your code will now work.

Kimmy answered 10/5, 2022 at 11:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.