Can't run Angular > 2 e2e using protractor behind a proxy

邮差的信 提交于 2019-12-05 18:53:11

ng e2e will execute webdriver-manager start/update in background, and webdriver-manager start will access "chromedriver.storage.googleapis.com" to query latest webdriver binary, your error comes from here.

Because ng e2e can't accept proxy from cli or pre-configured file, the only way you can set proxy for webdriver-manager start/update triggered by ng e2e is by Environment Variable.

Add below 3 Environment Variables:

HTTP_PROXY = http://my-proxy:port
HTTPS_PROXY = http://my-proxy:port
NO_PROXY = localhost,127.0.0.1, .yourcompany.com

Try ng e2e in new cmd window (don't try in old cmd window)

FYI, once you add the 3 Environment Variables, you no need to pass --proxy in cli when execute webdriver-manager start/update.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!