I’m trying to add screenshots to my testng report but the html “pointy brackets” are logged as square brackets so the report looks like the following. Anyone else experiencing this problem?
My Code:
FileUtils.copyFile(scrFile, new File(filename));
Reporter.setCurrentTestResult(testResult);
Reporter.log("<a href=\"" + filename + "\">Screenshot</a>");
Generated Report:
[a href="filename.png"]Screenshot[/a]
Known issue:
https://github.com/cbeust/testng/commit/6a577ffe7ea59c27434829ae3f11f0074b1d7cf5