I've used Protractor - 4.0.11 Jasmine - 2.5.2 and conf:
onPrepare: function() {
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: 'target/reports',
screenshotsFolder: 'target/screenshots',
fixedScreenshotName: true,
})
);}
the HTML report is created and looks like: Screenshot
The link for screenshot in html code of report:
<img src="target/screenshots/should-divide-four-and-two.png" width="100" height="100">
but the created path is: "target\reportstarget\screenshots"
I don't know why Jasmine adds the name form savePath "reports" in here. When code was:
onPrepare: function() {
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: 'target/screenshots',
fixedScreenshotName: true,
})
);}
folder path was: report - /target/screenshots screenshots - /screenshotsscreenshots
Somebody knows how to change it?
The screenshotsFolder
should contain a relative to the savePath
directory path. End your savePath
with a slash regardless of whether you provide screenshotsFolder
or not:
savePath: 'target/screenshots/'