I'm getting this error when ran ng e2e: Could not find update-config.json

孤街浪徒 提交于 2021-02-10 14:31:14

问题


Currently I have Protractor v.5.4.2, Node.js v.10.15.39

[09:21:29] I/launcher - Running 1 instances of WebDriver [09:21:29] I/direct - Using ChromeDriver directly... [09:21:29] E/direct - Error code: 135 [09:21:29] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.driver-manager update' to download binaries. anager update' to download binaries. [09:21:29] E/direct - Error: Could not find update-config.json. Run 'webdriver-mes\protractor\built\driverProviders\direct.js:63:31)


回答1:


There are many ways to solve this problem.

  1. Option 1: In terminal, you can try

project-dir$ webdriver-manager update

or

project-dir$ ./node_modules/protractor/bin/webdriver-manager update

or

project-dir$ ./node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update

or

project-dir$ ./node_modules/.bin/webdriver-manager update
  1. Option 2: You can update Gruntfile.js (jenskin,...)

Following grunt-protractor-runner you can see options.webdriverManagerUpdate. This is option which auto update webdriver-manager in /node_modules/grunt-protractor-runner. If you use this way, you don't have to use project-dir$ ./node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update

Gruntfile.js protractor: { options: { configFile: "test/e2e/protractor-conf.js", noColor: false, webdriverManagerUpdate:true, args: {} }, e2e: { options: { // Stops Grunt process if a test fails keepAlive: false, } } },



来源:https://stackoverflow.com/questions/57333886/im-getting-this-error-when-ran-ng-e2e-could-not-find-update-config-json

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