Home > database >  'chromedriver' executable needs to be in PATH - Python - Selenium (MAC)
'chromedriver' executable needs to be in PATH - Python - Selenium (MAC)

Time:12-12

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)

CodePudding user response:

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/

  • Related