'Chrome driver is not in a executable path how to fix this error in Selenium"
I'm confused as to what is causing this error:
The chrome version is 100.0.4986 which is the latest
Python version is 3.9.1:
Chrome web driver version is 100.0:
Path and location of web driver:
Code below based :
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'C:\Users\sanas\OneDrive\CSIT 110 Python\chromedriver.exe')
driver.get("https://www.google.com")
Error:
Solution 1:[1]
Put your chromedriver.exe in C:\ folder and try this code. The commented line is not necessary for opening new browser it will be used for finding elements on the page.
from selenium import webdriver
# from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
ser = Service('C:\\chromedriver.exe')
opt = webdriver.ChromeOptions()
web = webdriver.Chrome(service=ser, options=opt)
web.get('url link you want to open')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andrej12 |





