【问题标题】:send html report with row collapsed发送折叠行的 html 报告
【发布时间】:2019-07-31 02:20:12
【问题描述】:

我正在尝试通过电子邮件发送 pytest html 报告,但是电子邮件中的 javascript 被禁用。因此,html 报告默认展开所有行,并使电子邮件内容相当长。我在哪里可以设置默认折叠的行?

我尝试添加自定义 CSS 以折叠。但这也会在启用 javascript 时使报告折叠。

.results-table-row tr:nth-child(2) {
    display: none;
}

【问题讨论】:

    标签: python pytest pytest-html


    【解决方案1】:

    我通过在发送 html 报告内容之前手动将collapsed 类添加到<tr> 来解决... - -!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-20
      • 1970-01-01
      • 1970-01-01
      • 2021-12-23
      • 2022-09-28
      相关资源
      最近更新 更多