Error message chromedriver executable needs to be available in the path

+1 vote

I've written my Selenium code on Python and also downloaded the chromedriver.exe for my windows OS from here: http://chromedriver.storage.googleapis.com/index.html?path=2.15/

I extracted the downloaded zip file, and then put the path to the exe (C:\Users\michael\Downloads\chromedriver_win32) into the Environment Variable "Path". However, I get an error when I run this code:

  from selenium import webdriver
  driver = webdriver.Chrome()

Error log:

WebDriverException: Message: 'chromedriver' executable needs to be available in the path. Please look at     http://docs.seleniumhq.org/download/#thirdPartyDrivers and read up at http://code.google.com/p/selenium/wiki/ChromeDriver

But I think I've done everything correct. Can someone help me out here?

Apr 30, 2018 in Selenium by kappa3010
• 2,090 points
13,045 views
Hi,

Please download the Chrome driver from here as per your Operating System :
https://chromedriver.storage.googleapis.com/index.html?path=2.45/

Please unzip 'chromedriver_XXXX' and put 'chromedriver.exe' in 'C:\Python27\Scripts' folder.
If you follow this step, then you need not to provide the path of the driver, just invoke the driver using the following code :

driver= webdriver.Chrome()

Thanks,

Manish

1 answer to this question.

0 votes

Okay there are a couple of wrong doings here. 
1. You don't need to set your environment variables for chromedriver.exe. This is an executable.
2. The reason for your error is because you have to provide the path to chromedriver.exe in your code. Do it using System.setProperty().
3. And if your doing it using Elipse IDE, then remember that your path to chromedriver.exe will have to double slashes everywhere and not single slashes which is how usually the path is.

Below code is how you should do it.

System.setProperty("webdriver.chrome.driver", "C:\\Users\\michael\\Downloads\\chromedriver_win32.exe");
WebDriver driver = new ChromeDriver();
answered Apr 30, 2018 by king_kenny
• 3,710 points

Related Questions In Selenium

0 votes
1 answer
0 votes
0 answers

How to get the text from the HTML5 input error message in Selenium?

On giving invalid data in the email ...READ MORE

Mar 12, 2019 in Selenium by Vaishnavi
• 1,180 points
1,742 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
12,576 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
8,558 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
6,603 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,506 views
+1 vote
4 answers
0 votes
1 answer

How to open a browser windows silently in the background?

It is a little bit of a ...READ MORE

answered Apr 20, 2018 in Selenium by king_kenny
• 3,710 points
5,203 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP