I am new to protractor testing tool in angular js, I installed CORS extension in chrome browser, I wrote my first test-case, I try to run this using 'protractor config.js' chrome browser is getting open, actually it is login form, i entered correct username and password but it is not connecting to server, I understood that CORS extension was disabled, how to enable cors extension when i am running test case through cmd.
my config.js
exports.config = {
capabilities: {
// You can use other browsers
// like firefox, phantoms, safari, IE (-_-)
'browserName': 'chrome'
},
specs: [
// We are going to make this file in a minute
'../www/modules/user/login.spec.js',
//'../www/modules/lead/list.spec.js',
],
jasmineNodeOpts: {
showColors: true,
//defaultTimeoutInterval: 30000,
isVerbose: true,
},
allScriptsTimeout: 20000,
onPrepare: function(){
browser.driver.get('http://localhost:8100/');
}
};
By default, a completely clean browser is fired up with no extensions installed.
In order to start Chrome with an extension, you need to set the chromeOptions and the extensions appropriately. Here you can find working samples:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With