I have a config file that I usually use to execute a single user and multiple test suites. However, I am currently facing an issue where I need to run certain protractor suites with User A and other protractor test suites with User B. I am unsure of how to accomplish this in protractor.
exports.config = {
capabilities: {
browserName: 'chrome'
},
suites: {
loginAndNavigate: 'e2e/specFiles/LoginAndNavigateSpec.js',
homepage: 'e2e/specFiles/policiesList_HomepageSpec.js',
versionPage: 'e2e/specFiles/ER_VersionsPageSpec.js',
policyDetails: 'e2e/specFiles/policyDetailsPageSpec.js'
},
seleniumServerJar: '../node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar',
chromeDriver: '../node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26',
baseUrl: 'https://shared.qa.com/EdgeAuth/logindirect.jsp',
params: {
login: {
user: ‘user ',
password: 'abc123'
}
},
onPrepare: function() {
global.EC = protractor.ExpectedConditions;
browser.getCapabilities().then(function(c) {
console.log(c.get('browserName'));
});
global.Utils = require('./e2e/utils.js');
require('./e2e/matchers.js');
require('./e2e/customLocators.js');
},
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 100000
}
};