Hi everyone ! I hope you are fine today !
I would like to add har files (from API request) or at least the har name into the report (cucumber).
There is already great snipset of code :
@After public void actionAfterFailedScenario(final Scenario scenario) {
if (scenario.isFailed()) {
String errorMessage = ".har name";
errorMessage = errorMessage.concat("<a href=\"http://i_am_a_link\">link to the har</a>");
scenario.write(errorMessage); scenario.embed(errorMessage.getBytes(), "text/html");
}
}
//Taken from : https://github.com/damianszczepanik/cucumber-reporting/issues/610#issuecomment-286342554
But I’m not able to find such properties, I there a way to acces it ? something like
scenario.getCollectionOfHar()
//or
scenario.getHar()
Please let me know if you ahve an idea or a workaround
Have a nice day !