Masterng – Change the browser function at runtime

Is there a way to change the browser capabilities before each of the quantizer suites. I need to set the Capabilities.name property before each specification is executed.
To create a separate instance of the required capabilities, such as capabilities.name, you will need to try the multiCapabilities option provided by Protractor. An example looks similar to the following The content and reside in the conf.js file. This allows you to submit a unique name for each test session.

onPrepare: function(){
var caps = browser.getCapabilities()
},

multiCapabilities: [{
browserName:'firefox',
version: '32',
platform:'OS X 10.10',
name: "firefox-tests",
shardTestFiles: true,
maxInstances: 25
}, {
browserName: ' chrome',
version: '41',
platform:'Windows 7',
name: "chrome-tests",
shardTestFiles: true,
maxInstances: 25
}],

You can see a complete example here:

https://github.com/saucelabs-sample-test-frameworks/JS-CucumberJS -Protractor3.0/blob/master/conf.js

Is there a way to change the browser function before each of the quantizer suites. I need to execute in each specification Set the Capabilities.name property before.

< p>

To create a separate instance of the required capabilities, such as capabilities.name, you will need to try the multiCapabilities option provided by Protractor. An example looks similar to the following and resides in conf.js File. This allows you to submit a unique name for each test session.

onPrepare: function(){
var caps = browser.getCapabilities( )
},

multiCapabilities: [{
browserName:'firefox',
version: '32',
platform:'OS X 10.10' ,
name: "firefox-tests",
shardTestFiles: true,
maxInstances: 25
}, {
browserName:'chrome',
version : '41',
platform:'Windows 7',
name: "chrome-tests",
shardTestFiles: true,
maxInstances: 25
}],

You can see a complete example here:

https://github.com/saucelabs-sample-test-frameworks/JS-CucumberJS-Protractor3.0/blob/master /conf.js

Leave a Comment

Your email address will not be published.