pytest-html
pytest-html copied to clipboard
Support FORMAT_TEXT on recent chrome with self contained html
Right now doing something like this:
import pytest
from pytest_html import extras
def test_ex(extra):
print ("hey")
extra.append(extras.text("Hello World!\n", "Hello Text"))
leads to something like this:
The problem is if you click the "Hello Text" link, chrome will close it immediately. This is a standard behavior as of recent chrome (https://stackoverflow.com/questions/46818033/opening-datatext-plain-window-in-chrome-showing-up-blank).
Can we come up with a different way to make the text openable/viewable in self contained html?
Would the download attribute work perhaps?
https://www.geeksforgeeks.org/html-a-download-attribute/amp/
@christiansandberg , I think so. Opened #278 to use that. Thanks!