我正在使用angular 4的protector,当我运行e2e测试时,它无法从网络下载一些依赖项,因为它在我的组织代理中被阻止。
我尝试在protractor.conf.js中设置代理,但它不适用于我。
capabilities: {
'browserName': 'chrome',
'proxy': {
'proxyType': 'manual',
'httpProxy': 'http://ptx.proxy.corp.sopra:8080'
}运行ng e2e时出现以下错误
webpack: Compiled successfully.
events.js:183
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT 216.58.204.144:443
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)谁能告诉我如何在中使用代理。
发布于 2017-12-06 20:31:40
我确实找到了一种设置代理的方法,我用键http_proxy在系统环境变量中设置了代理,ng e2e对我来说运行得很好。
https://stackoverflow.com/questions/47532843
复制相似问题