问题
I'm trying to customize ExtentReports 4.0.9 When I'm opening report after test fails, It displays screenshot as very small thumbnails. How can i increase size of the Thumbnail.
I've tried extent-config.xml
<!-- custom styles -->
<styles>
<![CDATA[
.featherlight-image { border: 1px solid #f6f7fa; cursor: zoom-in; width: 100px; }
]]>
</styles>
Screenshot is : https://imgur.com/eSy5fLz
but it didn't work. Please suggest How can i Increase the size of thumbnail.
回答1:
I have researched about it and finally got the solution for my problem. I have added some CSS code from htmlreported of Extent Report 4.
htmlReporter.config().setCSS(".r-img { width: 30%; }");
report=new ExtentReports();
report.attachReporter(htmlReporter);
I have added above code when configuring ExtentReport.
I hope it will work for someone who face the same situation.
来源:https://stackoverflow.com/questions/57370624/how-to-increase-the-size-of-the-screenshot-thumbnails-in-extentreports-4-0-9