Search code examples
pythonpytestpytest-html

send html report with row collapsed


I'm trying to email pytest html report, however javascript in email is disabled. So the html report expand all rows by default and makes the email content quite long. Where can I set the row collapsed by default?

I've tried to add a custom css to collapse. but that will also make the report collapsed when javascript is enabled.

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

Solution

  • I resolved by adding collapsed class to <tr> manually before sending the html report content... - -!