【问题标题】:How to increase the size of the Screenshot Thumbnails in ExtentReports 4.0.9如何在 ExtentReports 4.0.9 中增加屏幕截图缩略图的大小
【发布时间】:2019-08-06 07:04:32
【问题描述】:

我正在尝试自定义 ExtentReports 4.0.9 当我在测试失败后打开报告时,它将屏幕截图显示为非常小的缩略图。如何增加缩略图的大小。

我已经尝试过 extent-config.xml

<!-- custom styles -->
    <styles>
      <![CDATA[
        .featherlight-image {   border: 1px solid #f6f7fa;   cursor: zoom-in;    width: 100px; }
      ]]>
    </styles>

截图是:https://imgur.com/eSy5fLz

但它没有工作。 请建议我如何增加缩略图的大小。

【问题讨论】:

    标签: java selenium-webdriver screenshot extentreports selenium-extent-report


    【解决方案1】:

    我对此进行了研究,最终找到了解决问题的方法。 我从 Extent Report 4 的 htmlreported 添加了一些 CSS 代码。

    htmlReporter.config().setCSS(".r-img { width: 30%; }");
    report=new ExtentReports();
    report.attachReporter(htmlReporter);
    

    我在配置 ExtentReport 时添加了上面的代码。

    我希望它对面临同样情况的人有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-09-28
      • 1970-01-01
      • 1970-01-01
      • 2015-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多