将量角器 chrome 驱动程序更新为 74 [英] update protractor chrome driver to 74

查看:56
本文介绍了将量角器 chrome 驱动程序更新为 74的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更新到 74 版本的 chromedriver

通常我会这样做:

webdriver-manager update --versions.chrome 2.46

但是以下方法不起作用:

however the following is not working:

webdriver-manager update --versions.chrome 74.0.3729.6

我使用的是 Protractor 5.4.2 版不想升级到 6,因为 API 还没有完成

I am on Protractor Version 5.4.2 Dont want to upgrade to 6 as API is not yet completed

日志:

[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

推荐答案

我为 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.

I found a working solution for protractor 5.4.2. You need to install webdriver-manager v12.1.3 and run npm dedupe. Then run webdriver-manager update --versions.chrome=2.46. In my case it didn't work because of webdriver-manager 12.1.1 installed selenium-server-standalone-4.0.0-alpha-1.zip.jar (this version only works with protractor 6.0.0) instead of selenium-server-standalone-3.141.59.jar.

旧答案

我发现现在 (30.04.2019) 启动它的唯一方法是单独启动 webdriver-manager 并连接到它的实例.它适用于 protractor v6.0.0webdriver-manager v12.1.3.

Only way I found to start it now (30.04.2019) is to start webdriver-manager separately and connect to its instance. It works with protractor v6.0.0 and webdriver-manager v12.1.3.

将此添加到protractor.conf.js:

exports.config = {
// ...
seleniumAddress: 'http://localhost:4444/wd/hub',
// ...
}

然后运行 ​​webdriver-manager start 并在另一个选项卡 protractor protractor.conf.js

then run webdriver-manager start and in another tab protractor protractor.conf.js

这篇关于将量角器 chrome 驱动程序更新为 74的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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