How to increase the size of the Screenshot Thumbnails in ExtentReports 4.0.9

左心房为你撑大大i 提交于 2021-01-29 20:01:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!