问题描述
我是Selenium的新手,现在可以将selenium与Chromedriver一起使用进行基本的自动测试,代码可以正常工作,但是问题是Chrome浏览器始终在后端自动更新,并且代码始终无法运行Chrome更新后.我知道我需要下载新的chromedriver来解决此问题,但是我想知道是否有任何方法可以在不禁用chromebrowser更新的情况下解决此问题? tks.
I'm new comer of Selenium, and I can use selenium with Chromedriver to do basic auto-test now, the code works fine, but the problem is Chrome browser always update automatically at the backend, and code always fail to run after Chrome update. I know I need to download new chromedriver to solve this issue, but I wonder if there's any way to solve this issue without disabling chromebrowser update? tks.
我正在使用Windows 10/Chrome版本67/Python 3.6.4/Selenium 3.12.0
I'm using Windows 10 / Chrome Version 67 / Python 3.6.4 / Selenium 3.12.0
推荐答案
否,除了更新 ChromeDriver 二进制版本外,别无选择,而 Chrome浏览器会不断自动更新.
No, there is no other alternative than updating the ChromeDriver binary versions, while the Chrome Browser keeps on getting updated automatically.
每个 Chrome浏览器在对某些功能进行添加,修改和从现有功能中删除后都会发布.为了符合当前的浏览器功能集, Chrome团队会不时发布兼容的 ChromeDriver 二进制文件.这些 ChromeDriver 二进制文件能够与 Chrome浏览器进行交互. ChromeDriver 二进制文件的某些版本支持特定范围的 Chrome浏览器版本(某些是最新版本),如下所示:
Each Chrome Browser is released after certain feature additions, modifications and removals from the existing features. To comply with the current set of Browser Features, Chrome Team releases the compatible ChromeDriver binary time to time. These ChromeDriver binaries are capable to interact with the Chrome Browser. Certain version of a ChromeDriver binary supports a specific range of Chrome Browser versions (some of the recent) as below:
-
ChromeDriver v 84.0.4147.30 (2020-05-28)
ChromeDriver v84.0.4147.30 (2020-05-28)
Supports Chrome version 84
ChromeDriver v 83.0.4103.39 (2020-05-05)
ChromeDriver v83.0.4103.39 (2020-05-05)
Supports Chrome version 83
ChromeDriver v 82 被故意跳过.
ChromeDriver v82 was intensionally skipped.
ChromeDriver v 81.0.4044.138 (2020-05-05)
ChromeDriver v81.0.4044.138 (2020-05-05)
Supports Chrome version 81
ChromeDriver v 80.0.3987.106 (2020-02-13)
ChromeDriver v80.0.3987.106 (2020-02-13)
Supports Chrome version 80
ChromeDriver v 79.0.3945.36 (2019-11-18)
ChromeDriver v79.0.3945.36 (2019-11-18)
Supports Chrome version 79
ChromeDriver v 78.0.3904.70 (2019-10-21)
ChromeDriver v78.0.3904.70 (2019-10-21)
Supports Chrome version 78
ChromeDriver v 77.0.3865.40 (2019-08-20)
ChromeDriver v77.0.3865.40 (2019-08-20)
Supports Chrome version 77
ChromeDriver v 76.0.3809.126 (2019-08-20)
ChromeDriver v76.0.3809.126 (2019-08-20)
Supports Chrome version 76
ChromeDriver v 75.0.3770.8 (2019-04-29)
ChromeDriver v75.0.3770.8 (2019-04-29)
Supports Chrome version 75
ChromeDriver v 74.0.3729.6 (2019-03-14)
ChromeDriver v74.0.3729.6 (2019-03-14)
Supports Chrome version 74
ChromeDriver v 73.0.3683.68 (2019-03-06)
ChromeDriver v73.0.3683.68 (2019-03-06)
Supports Chrome version 73
ChromeDriver v 2.46 (2019-02-01)
ChromeDriver v2.46 (2019-02-01)
Supports Chrome v71-73
ChromeDriver v 2.45 (2018-12-10)
ChromeDriver v2.45 (2018-12-10)
Supports Chrome v70-72
ChromeDriver v 2.44 (2018-11-19)
ChromeDriver v2.44 (2018-11-19)
Supports Chrome v69-71
ChromeDriver v 2.43 (2018-10-16)
ChromeDriver v2.43 (2018-10-16)
Supports Chrome v69-71
ChromeDriver v 2.42 (2018-09-13)
ChromeDriver v2.42 (2018-09-13)
Supports Chrome v68-70
ChromeDriver v 2.41 (2018-07-27)
ChromeDriver v2.41 (2018-07-27)
Supports Chrome v67-69
ChromeDriver v 2.40 (2018-06-07)
ChromeDriver v2.40 (2018-06-07)
Supports Chrome v66-68
ChromeDriver v 2.39 (2018-05-30)
ChromeDriver v2.39 (2018-05-30)
Supports Chrome v66-68
ChromeDriver v 2.38 (2018-04-17)
ChromeDriver v2.38 (2018-04-17)
Supports Chrome v65-67
ChromeDriver v 2.37 (2018-03-16)
ChromeDriver v2.37 (2018-03-16)
Supports Chrome v64-66
ChromeDriver v 2.36 (2018-03-02)
ChromeDriver v2.36 (2018-03-02)
Supports Chrome v63-65
ChromeDriver v 2.35 (2018-01-10)
ChromeDriver v2.35 (2018-01-10)
Supports Chrome v62-64
ChromeDriver v 2.34 (2017-12-10)
ChromeDriver v2.34 (2017-12-10)
Supports Chrome v61-63
ChromeDriver v 2.33 (2017-10-03)
ChromeDriver v2.33 (2017-10-03)
Supports Chrome v60-62
ChromeDriver v 2.32 (2017-08-30)
ChromeDriver v2.32 (2017-08-30)
Supports Chrome v59-61
ChromeDriver v 2.31 (2017-07-21)
ChromeDriver v2.31 (2017-07-21)
Supports Chrome v58-60
ChromeDriver v 2.30 (2017-06-07)
ChromeDriver v2.30 (2017-06-07)
Supports Chrome v58-60
ChromeDriver v 2.29 (2017-04-04)
ChromeDriver v2.29 (2017-04-04)
Supports Chrome v56-58
要使脚本/程序与更新的 Chrome浏览器保持交互,您必须使 ChromeDriver 二进制版本与 Chrome浏览器根据兼容性.
To keep your script/program interactive with the updated Chrome Browser you have to keep the version of ChromeDriver binary in sync with the Chrome Browser as per the compatibility.
这篇关于Chrome浏览器通过Python硒自动更新时如何使用特定版本的ChromeDriver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!