I'm trying to use selenium but I'm getting the error
'chromedriver' executable needs to be in PATH.
But I know for a fact that it's in PATH. I have the exe located in C:\WebDriver\bin. It's been added to my system variables
System variables image.
Running chromedriver
in the command prompt successfully returns
Starting ChromeDriver 89.0.4389.23 (61b08ee2c50024bab004e48d2b1b083cdbdac579-refs/branch-heads/4389@{#294}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
I've restarted my computer. I tried directly specifying the executable_path
driver = Chrome(executable_path=r"C:\WebDriver\bin\chromedriver.exe")
I used ProcessMonitor if anyone can make sense of these logs (filter: "path contains chromedriver")
Update:
Using webdriver-manager
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
Gave me the error
ValueError: Could not get version for Chrome with this command: google-chrome --version || google-chrome-stable --version