I have tried to get selenium chrome driver working for weeks but I run into the same problem, selenium can't find my chromedriver.exe file
I am currently on Windows 10 and my version on chrome is 76.0.3809.100. I pip installed selenium in a virtual environment that is located in an EXTERNAL HARD DRIVE (E:). I try the basic chrome driver setup by calling
from selenium import webdriver
browser = webdriver.Chrome()
I put chromedriver.exe in my path, and I can verify that by typing chromedriver in cmd and I get this output. It seems like it is the same version of chrome that I am using
Starting ChromeDriver 76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024}) on port 9515
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
The error that I get when I try to run this test program is this.
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
I have tried different combinations of putting chromedriver.exe in various folders (using forward slashes and double backslashes) and running
from selenium import webdriver
browser = webdriver.Chrome("C:/python/Scripts/chromedriver.exe")
from selenium import webdriver
browser = webdriver.Chrome(r"C:/python/Scripts/chromedriver.exe")
from selenium import webdriver
browser = webdriver.Chrome(executable_path="C:/python/Scripts/chromedriver.exe")
from selenium import webdriver
browser = webdriver.Chrome("E:\\SportsReference\\seleniumc\\chromedriver.exe")
from selenium import webdriver
browser = webdriver.Chrome(r"E:\\SportsReference\\selenium\\chromedriver.exe")
from selenium import webdriver
browser = webdriver.Chrome(executable_path="E:\\SportsReference\\selenium\\chromedriver.exe")
etc.....
Every time I try to run one of the test programs above, I get the same error saying chromedriver needs to be in my path.
Someone, please help me because I have spent so much time just trying to get this basic test up and running.