我正在尝试将屏幕截图添加到我的 testng 报告中,但 html“尖括号”被记录为方括号,因此报告如下所示。还有人遇到这个问题吗?
我的代码:
FileUtils.copyFile(scrFile, new File(filename));
Reporter.setCurrentTestResult(testResult);
Reporter.log("<a href=\"" + filename + "\">Screenshot</a>");
生成的报告:
[a href="filename.png"]Screenshot[/a]
最佳答案
关于java - testng reports.log 将 "<"视为 "[",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11848066/