如何更新到chromedriver 74版本
通常我会这样做:
webdriver-manager update --versions.chrome 2.46
但是以下方法不起作用:
webdriver-manager update --versions.chrome 74.0.3729.6
我在Protractor Version 5.4.2
上
由于API尚未完成,不想升级到6
日志:
[16:21:43] E/downloader - undefined
[16:21:43] I/update - chromedriver: file exists /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_74.0.3729.6.zip
[16:21:43] I/update - chromedriver: unzipping chromedriver_74.0.3729.6.zip
(node:35565) UnhandledPromiseRejectionWarning: Invalid filename
(node:35565) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:35565) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[16:21:44] I/update - selenium standalone: file exists /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-4.0.0-alpha-1.zip.jar
[16:21:44] I/update - selenium standalone: selenium-server-standalone-4.0.0-alpha-1.zip.jar up to date
[16:21:44] I/update - geckodriver: file exists /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.24.0.tar.gz
[16:21:44] I/update - geckodriver: unzipping geckodriver-v0.24.0.tar.gz
[16:21:44] I/update - geckodriver: setting permissions to 0755 for /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.24.0
[16:21:44] I/update - geckodriver: geckodriver-v0.24.0 up to date
[更新-解决方案]
npm install -g webdriver-manager@12.1.4
webdriver-manager version
webdriver-manager update
答案 0 :(得分:0)
我找到了protractor 5.4.2
的可行解决方案。您需要安装webdriver-manager v12.1.3
并运行npm dedupe
。然后运行webdriver-manager update --versions.chrome=2.46
。在我的情况下,由于安装了webdriver-manager 12.1.1
selenium-server-standalone-4.0.0-alpha-1.zip.jar
(此版本仅适用于protractor 6.0.0
)而不是selenium-server-standalone-3.141.59.jar
,因此无法正常工作。
旧答案
我发现现在开始启动(30.04.2019)的唯一方法是分别启动webdriver-manager并连接到其实例。它适用于protractor v6.0.0
和webdriver-manager v12.1.3
。
将此添加到protractor.conf.js
:
exports.config = {
// ...
seleniumAddress: 'http://localhost:4444/wd/hub',
// ...
}
然后运行webdriver-manager start
并在另一个标签protractor protractor.conf.js