Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

browser.restart() opens browser one more time then number of test #3283

@Saurabh06

Description

@Saurabh06

I have tested by using protractor 3.2 and jasmine 2 with chrome browser having conf file

Conf.js
exports.config = {
seleniumServerJar:'../node_modules/protractor/selenium/selenium-server-standalone-2.53.0.jar',
chromeDriver: '../node_modules/protractor/selenium/chromedriver.exe',
allScriptsTimeout: 150000,
capabilities: {
browserName: 'chrome',
browser_version: '50.0',
},
restartBrowserBetweenTests: true,
framework: 'jasmine2',
specs:['../Specs/Spec.js'],
onPrepare: function() {

    },

jasmineNodeOpts: {
defaultTimeoutInterval: 300000,
onComplete: null,
showColors: true,
includeStackTrace: true,
}
}

when i try to run with spec having 2 it test case then restart browser open browser 3 times instead of 2 times.

Spec.js
describe('Testing', function() {
beforeEach(function() {
browser.get('http://juliemr.github.io/protractor-demo/');
});
fit('should have a title', function() {
expect(browser.getTitle()).toEqual('Super Calculator');
});

  fit('should add one and two', function() {
        element(by.model('first')).sendKeys(1);
        element(by.model('second')).sendKeys(2);
        element(by.id('gobutton')).click();
        expect(element(by.binding('latest')).getText()).
            toEqual('5'); // This is wrong!
      });

});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions