Run following commands to install Protractor html ScreenShot report
$ npm install protractor-html-screenshot-reporter --save-dev
after this update your Protractor.conf.js with
var Jasmine2HtmlReporter = require('/usr/lib/node_modules/protractor-jasmine2-html-reporter');
onPrepare() {
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: 'Mention location of your test result',
fileName: 'Test Result',
fileNameDateSuffix: true ,
takeScreenShotsOnlyForFailedSpecs: true,
}),
new SpecReporter({ spec: { displayStacktrace: true } })
);
In this location it will create a seprate folder called "ScreenShots" and saves all the screenshot here
"savePath: 'Mention location of your test result'"