我正在尝试自定义 ExtentReports 4.0.9 当我在测试失败后打开报告时,它将屏幕截图显示为非常小的缩略图。如何增加缩略图的大小。
我尝试过extent-config.xml
<!-- custom styles -->
<styles>
<![CDATA[
.featherlight-image { border: 1px solid #f6f7fa; cursor: zoom-in; width: 100px; }
]]>
</styles>
截图为:/image/HQ37j.jpg
但是没有成功。 请建议我如何增加缩略图的大小。
最佳答案
我研究了一下,终于找到了解决我的问题的方法。 我从 Extent Report 4 的 htmlreported 添加了一些 CSS 代码。
htmlReporter.config().setCSS(".r-img { width: 30%; }");
report=new ExtentReports();
report.attachReporter(htmlReporter);
我在配置ExtentReport时添加了上面的代码。
希望它对面临同样情况的人有用。
关于java - 如何增加 ExtentReports 4.0.9 中屏幕截图缩略图的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57370624/