adamgruber / mochawesome

A Gorgeous HTML/CSS Reporter for Mocha.js
https://gitter.im/mochawesome/general
MIT License
1.06k stars 160 forks source link

ScreenShot is not saving in the screenshot folder - Mochawesome-screenshots #383

Open RaviThippana opened 2 years ago

RaviThippana commented 2 years ago

I am trying to add screen shot when test fail happens in playwright using Mochawesome-screenshots. Below is my snippet of .mocharc.js module.exports = { reporter: "mochawesome-screenshots", "reporter-option": [ "reportDir=Automation_Reports", "reportName=" + ReportCustomFolderName + "", "overwrite=true", "reportTitle=Automation Test Report", "shortScrFileNames=true", "takePassedScreenshot=false", "clearOldScreenshots= true", "screenshotsFolder=screenshots", ], }; But no screenshots are added in the screenshot folder. And my report is looking like below

Screenshot I am using below versions.. "dependencies": { "mocha": "^10.0.0", "mochawesome-report-generator": "^6.2.0", "mochawesome-screenshots": "^1.7.3", "playwright": "^1.27.0", }, "devDependencies": { "mochawesome": "^7.1.3" }

Please advise. Thanks in advance

joakim-sch commented 2 years ago

Your problems seems to be related to the url to the screenshot. If you look at the broken image url in the report, where is it pointing too? Where is it actually stored and is the url pointing to the correct location?

Also, I consider posting this issue in the mochawesome-screenshot issues page.