首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Webdriver-manager更新无法下载geckodriver

Webdriver-manager更新无法下载geckodriver
EN

Stack Overflow用户
提问于 2020-03-21 01:56:12
回答 1查看 997关注 0票数 0

我正在尝试为我的angular应用程序自动化设置量角器。我在Node版本12上,我安装了量角器版本5.4.3。当我使用webdriver-manger update --proxy=blahblahproxy.com时,我看到下面的错误。

代码语言:javascript
复制
[13:37:06] I/config_source - curl -oC:\Users\******\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\gecko-response.json '**corpproxy**/repos/mozilla/geckodriver/releases' -H 'host:api.github.com'
(node:15904) UnhandledPromiseRejectionWarning: Error: response status code is not 200.  It was 407
    at Request.<anonymous> (C:\Users\*****\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\built\lib\binaries\config_source.js:181:28)
    at Request.emit (events.js:311:20)
    at Request.onRequestResponse (C:\Users\*****\AppData\Roaming\npm\node_modules\protractor\node_modules\request\request.js:1059:10)
    at ClientRequest.emit (events.js:311:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:603:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
    at Socket.socketOnData (_http_client.js:476:22)
    at Socket.emit (events.js:311:20)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
(node:15904) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15904) [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.


Chrome and selenium standlaone server are updated/downlaoded just fine 

when i do webdriver-manager status
[13:39:39] I/status - selenium standalone version available: 3.141.59
[13:39:39] I/status - chromedriver version available: 80.0.3987.106
[13:39:39] I/status - geckodriver is not present
[13:39:39] I/status - IEDriverServer is not present
[13:39:39] I/status - android-sdk is not present
[13:39:39] I/status - appium is not present
EN

回答 1

Stack Overflow用户

发布于 2020-03-21 11:31:10

在公司代理下,我们将面临这样的问题。

所需的代理身份验证是一个HTTP响应状态代码,指示服务器无法完成请求,因为客户端缺少用于在客户端和服务器之间拦截请求的代理服务器的正确身份验证凭据。

选项1:尝试使用selenium-standalone npm包。这类似于webdriver-manager。

https://www.npmjs.com/package/selenium-standalone

全局安装此程序包

代码语言:javascript
复制
npm i -g selenium-standalone

然后下载/安装驱动程序

代码语言:javascript
复制
selenium-standalone install

然后启动服务器

代码语言:javascript
复制
selenium-standalone start

(或)

选项2:https://stackoverflow.com/a/53358685/8903949

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60779288

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档