问题
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.
- 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
- 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