Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 量角器e2e(角度6 Web UI):错误:getaddrinfo ENOTFOUND chromedriver.storage.googleapis.com chromedriver.storage.googleapis.com:443_Angular_Protractor_E2e Testing_Angular E2e - Fatal编程技术网

Angular 量角器e2e(角度6 Web UI):错误:getaddrinfo ENOTFOUND chromedriver.storage.googleapis.com chromedriver.storage.googleapis.com:443

Angular 量角器e2e(角度6 Web UI):错误:getaddrinfo ENOTFOUND chromedriver.storage.googleapis.com chromedriver.storage.googleapis.com:443,angular,protractor,e2e-testing,angular-e2e,Angular,Protractor,E2e Testing,Angular E2e,我们正在公司infra内(代理后)运行e2e测试。有时会出现错误(ng e2e—无webdriver更新): 可以使用以下命令修复它: 1) webdriver-manager clean 2) webdriver-manager update --proxy http://user:password@URL:port 3) Replace projectABC\node_modules\protractor\node_modules\webdriver-manager\selenium\ wi

我们正在公司infra内(代理后)运行e2e测试。有时会出现错误(ng e2e—无webdriver更新):

可以使用以下命令修复它:

1) webdriver-manager clean
2) webdriver-manager update --proxy http://user:password@URL:port
3) Replace projectABC\node_modules\protractor\node_modules\webdriver-manager\selenium\
with
%NODE_JS_HOME% \node_modules\protractor\node_modules\webdriver-manager\selenium\

是否可以解决驱动程序的周期性问题?

似乎这是webdriver的已知问题。您可以按照GitHub上的线程进行操作:

--不能使用任何webdriver更新选项来避免每次更新驱动程序(ng e2e--无webdriver更新)

您可以在
package.json
中添加以下
脚本

1) 如果您喜欢在单个cmd中更新webdriver并运行e2e测试,您可以 可以按如下方式配置脚本:

  "scripts": {
    "ng": "ng",
    "wd-update": "webdriver-manager clean && webdriver-manager update --proxy http://user:password@URL:port",
    "e2e": "wd-update && ng e2e --no-webdriver-update"
  },
并且只需要执行一个cmd:

  npm run e2e
2) 如果您希望webdriver更新并在单独的cmd中运行e2e测试,则可以按照以下方式配置脚本:

  "scripts": {
    "ng": "ng",
    "wd-update": "webdriver-manager clean && webdriver-manager update --proxy http://user:password@URL:port",
    "e2e": "ng e2e --no-webdriver-update"
  },
并执行两个命令:

  // execute `npm run wd-update` before `npm run e2e`. 
  // If you execute below cmds manually, you can skip to
  // execute `npm run wd-update` if you had succeed to execute it before.
  npm run wd-update
  npm run e2e 

谢谢对于我们的例子,我认为最好使用“e2e”:“ng e2e——无webdriver更新”
  // execute `npm run wd-update` before `npm run e2e`. 
  // If you execute below cmds manually, you can skip to
  // execute `npm run wd-update` if you had succeed to execute it before.
  npm run wd-update
  npm run e2e