离线机器上的量角器 [英] Protractor on offline machine
问题描述
- Angular 4 cli 项目我们有带有私有 npm 存储库的私有网络.(没有连接到互联网).所以在下载所有模块后,我想运行 e2e 测试.
Protractor 使用 webdriver-manager 下载最新的 chrome 驱动程序.但他无法下载驱动程序,所以我收到此错误:
Protractor use webdriver-manager to download the latest chrome driver. but he can't download the driver so I get this error :
etaddrinfo ENOTFOUND chromedriver.storage.googleapis.com chromedriver.storage.googleapis.com:443
我尝试手动下载驱动程序,并在 protactor-config 中:
I tried to download the driver manually, and inside the protactor-config :
{
chromeDriver: "../../chromedriver.exe", // I also tried with "./chromedriver_2.30.exe"
....}
(我不知道 chromedriver 是 protractor.config 的相对路径还是量角器内的 webdriver-manager 模块)
(I don't know if the chromedriver is relative path to the protractor.config or to the webdriver-manager module inside protractor)
但是我一直收到这个错误,我如何在没有互联网连接的情况下处理这个错误?
But I keep getting this error, how can I treat this error without an internet connection at all?
顺便说一句,有一点需要考虑,我们是在windows上开发的,但是我们的ci/cd服务器(linux)怎么才能得到一个适合linux的驱动呢??
btw, something to consider, we develop on windows, but how can our ci/cd server (linux) will get a driver suitable for linux??
推荐答案
我遇到了类似的问题.用谷歌搜索找到了这个答案,我试过了.似乎有效.
I had a similar issue. Found this answer with googling and I tried it. Seems to work.
随着量角器的最新变化,您可以使用:
With recent changes in protractor you can use:
ng e2e --webdriver-update=false
这篇关于离线机器上的量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!