#Once the zip has finished downloading, extract the folder and copy the path of the chromedriver exe file (should be the #first one), add it to your code like this,
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
url = "somewebsite.com"
service_obj = Service("D:\\Users\\eggman\Downloads\chromedriver-win64\chromedriver-win64\chromedriver.exe")
driver = webdriver.Chrome(service=service_obj)
driver.get(url)
Run Code Online (Sandbox Code Playgroud)
返回错误:
selenium.common.exceptions.SessionNotCreatedException:此版本的 ChromeDriver 仅支持 Chrome 版本 114。LATEST_RELEASE_115 不存在
我想为了避免这种情况,我可以关闭自动更新吗?
我最初使用了以下代码,效果很好
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
Run Code Online (Sandbox Code Playgroud)