I am trying to follow the tutorial at https://docs.angularjs.org/tutorial and have an error running the command
npm run protractor
Here is the
in your conf.js file change to chromeOnly: false
exports.config = {
allScriptsTimeout: 11000,
specs: [
'e2e/*.js'
],
capabilities: {
'browserName': 'chrome'
},
chromeOnly: false,
baseUrl: 'http://localhost:8000/',
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
similer issue you can find here #176
For those who are on a Mac and getting this error, the following open issue can cause this: https://github.com/angular/webdriver-manager/issues/476
The solution is provided by ciekawy. In
node_modules/webdriver-manager/built/lib/files/file_manager.js
or
node_modules/protractor/webdriver-manager/built/lib/files/file_manager.js
add the following code at line 166:
fileUrl.url = fileUrl.url.replace(/_m1/, '');
You will then need to update the chrome drivers to pick up the change. If using NRWL's NX monorepo management tools:
npx webdriver-manager clean
npx webdriver-manager update --gecko=false --versions.chrome=<version from chrome://versions>