Aman Gupta
Aman Gupta

Reputation: 3797

Protractor : Refreshing browser instance between testsuites

I am running multiple test suits in series and hence the same browser object of protractor is getting used in all test suites. Is there a way in protractor to flush the state of this browser object after each test suite is finished i.e. making the browser object stateless across the testsuites.

Upvotes: 2

Views: 1299

Answers (1)

Geraldo Megale
Geraldo Megale

Reputation: 363

Maybe this capability can help: restartBrowserBetweenTests

Example:

 capabilities: {
'browserName': 'chrome',
  'chromeOptions': {
'args': ['profile.default_content_settings.popups:1'] }
},

restartBrowserBetweenTests: true,

plugins: [{
package: 'protractor-console',
logLevels: ['info']
}],

baseUrl: 'http://localhost:3000'

}

Upvotes: 2

Related Questions