Protractor restartBrowserBetweenTests

Protractor restartBrowserBetweenTests make the browser to restart between the it blocks. In protractor, It blocks are nothing but tests. SO if we have a requirement to start the browser between each test then we can make use of the code.

For example, we can't inject the test name into the browser at start time because it's starting up while the previous test is active. I have performed my testing using below code, give a try if you have time.

Assertions in Jasmine

Spec file

import { browser} from "protractor";
describe("restart browser between tests in Protractor", function(){
    it('test 1', function() {
        browser.ignoreSynchronization = true
    it('test 2', function() {
        browser.ignoreSynchronization = true
Conf file

exports.config = {
  chromeDriver: 'PATH/chromedriver.exe',
  seleniumServerJar: 'PATH/jars/selenium-server-standalone-3.11.0.jar',
  specs: ['PATH\\JSFilesLocation\\Spec\\abc.js'],
  restartBrowserBetweenTests: true,
  capabilities: {
	  browserName: 'chrome'
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions