How to rerun a test suite with a different browser?
Currently, my test scripts contain the following loop:
function testScript01() {
for (let eachBrowser of supportedBrowsers) {
startBrowser(eachBrowser);
testStep01;
testStep02;
etc etc;
}
}
i.e. simply repeating the test for each browser we have added to our supported browsers list.
However, I 'd like to know if this can be done in a smarter way?
For example, on a much higher level: The project test items. I notice, there is a 'count' column where you can specify how many times a test item will be repeated.
Is there a way to read the iteration number of the current test or specify parameters per iteration? That way, I can simply extract the browser to use for the specific test by using startBrowser(supportedBrowsers[iteration number]) or set the browser via a parameter for that iteration.