Current Behavior:
If any TestCase is Failed, Protractor not continuing with the next Testcase and holding to the same failed Testcase .
Waits for long time and throws A Jasmine spec timed out. Resetting the WebDriver Control Flow.
EXPECTED BEHAVIOR:
On failure on any Testcase, Protractor should continue with next TestCase.
Can anyone help with Sample script for it.
CONFIG.js :
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
var fs = require('fs');
require('protractor/built/logger').Logger.logLevel = 1;
exports.config = {
//seleniumServerJar: "node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.3.1.jar",
framework: 'jasmine2',
directConnect: true,
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['incognito', '--start-maximized'], // this line is for maximize the window and incognito view
prefs: {
'profile:managed_default_content_settings.notifications': 1,
args: ['--no-sandbox', '--test-type=browser'],
'download': {
'prompt_for_download': false,
'default_directory': 'C:/Users/AAA/AppData/Roaming/npm/node_modules/protractor/Workspace/Reports/Download/'
},
},
},
},
allScriptsTimeout: 500000,
ignoreUncaughtExceptions: true,
jasmineNodeOpts: {
isVerbose: true,
showColors: true,
includeStackTrace: true,
displaySpecDuration: true,
defaultTimeoutInterval: 360000,
print: function () {
}
},
onPrepare: function(){
browser.manage().window().maximize(); // set browser size...
rmDir('C:/Users/AAA/AppData/Roaming/npm/node_modules/protractor/Workspace/Reports/Download');
require('./Data/waitReady.js');
// better jasmine 2 reports...
global.isAngularSite = function(flag){
browser.driver.ignoreSynchronization = !flag;
};
// Remove files in Specified Directory
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: true,
displayFailuresSummary: true
}
}));
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: './Reports/JunitXMLprotractor-result/',
filePrefix: 'xmloutput'
}));
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: './Reports/Screenshots/',
takeScreenshots: true,
takeScreenshotsOnlyOnFailures: true,
consolidateAll: true,
showPassed: true,
// filePrefix: sessionId + 'AutomationReport',
filePrefix: 'AutomationReport',
cleanDestination: true,
})
);
},
// specs : './AAA/ListPage_EM_Acc_Spec.js',
};