I want to alter the baseUrl to contain paramaters from a json, to open a different url to run a test for each market i have. How do i go about that? This is what i have so far. protractor - 5.1.2 typescript: 2.4.2
locales.json
{
"markets": ["us", "uk", "ca"]
}
config.js
params: {
data:require('./e2e/testdata/locales.json') ,
baseUrl: 'https://mywebsite' + markets[i] + '.com' //should get all items from json
},
spec.ts beforeEach(() => {
page = new PageObject();
browser.waitForAngularEnabled(false);
browser.get(baseUrl); // i want the test to run more than once, for all items in json file
});