0

I keep getting this error:

selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home

My Script: (MAC)

from selenium import webdriver

PATH='~ ABC$ /Users/ABC/Desktop/Chromedriver/chromedriver.exe'
driver = webdriver.Chrome(PATH)
driver.get("https://google.com")

What should I do? The Path is okay. I though there is something wrong with the format so I added ".exe" to file, but I am getting the same issue.

Note: The browser and package version are the same (96)

Nick ODell
  • 15,465
  • 3
  • 32
  • 66
Trader_M
  • 47
  • 10
  • 1
    I don't think `~ ABC$ ` should be part of the path. I think the path should just be the part `/Users/ABC/Desktop/Chromedriver/chromedriver.exe`. Does that work? – Nick ODell Dec 12 '21 at 02:58
  • Does this answer your question? [Error message: "'chromedriver' executable needs to be available in the path"](https://stackoverflow.com/questions/29858752/error-message-chromedriver-executable-needs-to-be-available-in-the-path) – Arundeep Chohan Dec 12 '21 at 04:53
  • It worked! Thanks. – Trader_M Dec 12 '21 at 06:07

1 Answers1

0

PATH should contain the Folder Path to your driver.

Having '~ ABC' in your path makes it look for something in the ~ ABC file which does not exsist as a parent file to /Users/