You need to specify the path where your chromedriver is located.
-
Place chromedriver on your system path, or where your code is.
-
If not using a system path, link your
chromedriver.exe
(For non-Windows users, it’s just calledchromedriver
):browser = webdriver.Chrome(executable_path=r"C:\path\to\chromedriver.exe")
(Set
executable_path
to the location where your chromedriver is located.)If you’ve placed chromedriver on your System Path, you can shortcut by just doing the following:
browser = webdriver.Chrome()
-
If you’re running on a Unix-based operating system, you may need to update the permissions of chromedriver after downloading it in order to make it executable:
chmod +x chromedriver
-
That’s all. If you’re still experiencing issues, more info can be found on this other StackOverflow article: Can’t use chrome driver for Selenium