Selenium 错误:此版本的 ChromeDriver 仅支持 Chrome 81 版 [英] Selenium Error: This version of ChromeDriver only supports Chrome version 81

查看:48
本文介绍了Selenium 错误:此版本的 ChromeDriver 仅支持 Chrome 81 版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在用 Selenium 打开 chrome 时遇到错误,它在打开后立即打开并关闭窗口.这是我的代码:

I am getting an error when opening up chrome with Selenium, it opens up and closes the window right after opening. Here is my code:

import requests
import json
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'C:\Users\Salvatore\Desktop\Desktop\webdrivers\chromedriver.exe')```

This is the error:
```selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81```

推荐答案

请检查您使用的是哪个 chrome 浏览器,您应该根据 chrome 浏览器版本使用 chrome 驱动程序 exe(错误似乎您使用的是 81 版本的 chrome 驱动程序,但您的chrome 浏览器版本不超过 81 就像 83,84)

Please check which chrome browser you are using , you should use chrome driver exe according chrome browser version ( Error seems like you are using chrome driver version of 81 but your chrome browser version no more than 81 like 83,84)

https://chromedriver.chromium.org 你可以在这里下载最新的 chrome 驱动程序版本

https://chromedriver.chromium.org you can download latest chrome driver version here

这篇关于Selenium 错误:此版本的 ChromeDriver 仅支持 Chrome 81 版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆