Error selenium common exceptions WebDriverException Message chromedriver executable needs to be in PATH

+1 vote

I get the following error:

Traceback (most recent call last):
  File "C:\Users\ishaq\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\common\", line 74, in start
    stdout=self.log_file, stderr=self.log_file)
  File "C:\Users\ishaq\AppData\Local\Programs\Python\Python36\lib\", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Users\ishaq\AppData\Local\Programs\Python\Python36\lib\", line 992, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/ishaq/AppData/Local/Programs/Python/Python36/", line 9, in <module>
    driver = webdriver.Chrome(executable_path=os.path.abspath("chromedriver"),   chrome_options=chrome_options)
  File "C:\Users\ishaq\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\chrome\", line 62, in __init__
  File "C:\Users\ishaq\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\common\", line 81, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see

And my script is:

import os  
from selenium import webdriver  
from selenium.webdriver.common.keys import Keys  
from import Options 

chrome_options = Options()  
chrome_options.binary_location = 
driver = webdriver.Chrome(executable_path=os.path.abspath("chromedriver"),   

magnifying_glass = driver.find_element_by_id("js-open-icon")  
if magnifying_glass.is_displayed():  
  menu_button = driver.find_element_by_css_selector(".menu-trigger.local") 

search_field = driver.find_element_by_id("site-search")  
assert "Looking Back at Android Security in 2016" in driver.page_source
May 10, 2018 in Selenium by eLiJha
• 770 points
hey brother,

can i get ur mail ID so that we ccan discuss about the webdriver problems

4 answers to this question.

+4 votes
Best answer

You can also handle this error with python script:

In command line:

pip install webdriver-manager

Python script:

from selenium import webdriver
from import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())

Hope this helps!

Join our Selenium Certification training online and become the expert.


answered Nov 27, 2018 by Srujan

edited Aug 4, 2023 by Khan Sarfaraz
Thank you Sir, it works!
Hi, this is one of the few solutions that has worked for me perfectly! Thank you.

Do you know how I prevent Chrome from launching every time I run my code with this ChromeDriverManager?
I would only like to see the web scraping results, not the web pages displayed in the Chrome browser.
Hello, @scrapes. I hope you are doing well.

Please do register at Edureka Community and upvote the answer if it has helped you.

Hi Srujan,

I am able to install webdriver-manager using command "pip install --user webdriver-manager".

But I am still getting error.

ModuleNotFoundError: No module named 'webdriver_manager'.
Below is my code.

from selenium import webdriver
from import ChromeDriverManager
import time

driver = webdriver.Chrome(ChromeDriverManager().install()).

Could you please provide your suggestion.

 Make sure you have properly installed selenium as well. If not, use the following to install it,

python -m pip install -U selenium

Later use your code to install web driver.

It works, thanks
I am getting this error while trying to install webdriver:

Fatal error in launcher: Unable to create process using '"c:\users\dibyajyoti.a.sahoo\appdata\local\programs\python\python37-32\python.exe"  "C:\Users\dibyajyoti.a.sahoo\AppData\Local\Programs\Python\Python37-32\Scripts\pip.exe" install webdriver-manager': The system cannot find the file specified.

Hey @Dibya, have u tried srujan's solution?

Also refer to

Hope this helps!

I am getting following with above code can anyone help here?

Traceback (most recent call last):
  File "", line 2, in <module>
    from import ChromeDriverManager
  File "/home/delhivery/Desktop/lambdatest/venv/lib/python3.5/site-packages/webdriver_manager/", line 4, in <module>
    from webdriver_manager.driver import ChromeDriver
  File "/home/delhivery/Desktop/lambdatest/venv/lib/python3.5/site-packages/webdriver_manager/", line 77
    self.auth_header = {'Authorization': f'token {self._os_token}'}
SyntaxError: invalid syntax

Hello @ Akshat Garg,

Have  you tried to import the package called webdriver_manager? if not you can installed it by:

pip install webdriver_manager

Also this can be done automatically using webdriver-manager

Note:Our system needs to know where to locate the chromedriver.exe. You could put it into a directory that is in your system's PATH variable, or just tell the constructor where it is:

browser = webdriver.Chrome('C:\\path\\to\\chromedriver.exe')
Hi, thank you for your contribution to the Edureka Community.

Register/Sign up on the community to gain points for further contributions. You may ask questions, answer, upvote, and downvote an answer. Each of these would fetch you points and you could be among the top contributors and win exciting merchandise from Edureka.

+1 vote

Very basic error. The main issue is with the path and driver execuable. So it's clear from the error that the Python client was unable to locate the chromedriver binary. When your mentioning the path of the driver, append it with the extension. Like this:

driver = webdriver.Chrome(executable_path=os.path.abspath("chromedriver.exe")
For details, You can even check out Selenium concepts with the Selenium online training.
answered May 10, 2018 by king_kenny
• 3,710 points
Thank you guys! The one with green tick worked for me :)
Hey, Please do upvote the answer in case you found it helpful.
0 votes

You can test if it actually is in the PATH, if you open a cmd and type in chromedriver (assuming your chromedriver executable is still named like this) and hit Enter. If Starting ChromeDriver 2.15.322448 is appearing, the PATH is set appropriately and there is something else going wrong.

Alternatively, you can use a direct path to the chromedriver like this:

 driver = webdriver.Chrome('/path/to/chromedriver') 

So in your specific case:

 driver = webdriver.Chrome("C:/Users/michael/Downloads/chromedriver_win32/chromedriver.exe"
answered Dec 14, 2020 by Roshni
• 10,520 points
0 votes

You can download ChromeDriver here: 

Then you have multiple options:

  • add it to your system path
  • put it in the same directory as your python script
  • specify the location directly via executable_path

    driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')
answered Dec 14, 2020 by Gitika
• 65,910 points

Related Questions In Selenium

+1 vote
1 answer
0 votes
1 answer
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
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
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
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
+10 votes
17 answers

How to automate gmail login process using selenium webdriver in java?

Check the below code: Here is the working ...READ MORE

answered Apr 24, 2018 in Selenium by Vardy
• 2,360 points
0 votes
1 answer
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP