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!
});
});