pytest-dev / pytest-dev/pytest-html
Possible to have --self-contained-html extra.image open in new tab
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 779
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
So currently I would like to pass images from web driver as base 64 encoded straight into your extra.image helper.
When setting to --self-contained-html. This works great, the only downside is that the images are no longer clickable. They don't open in a new tab.
Would it be possible to embed a little bit of JS on an onClick handler so that the image can open in a new tab? I'd love to submit a pull request but Im not Pythonic enough just yet!
This would be the icing on the cake for the self contained option!
Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the extra.image helper and the --self-contained-html output path in the pytest-html codebase. Check how embedded images are rendered, then verify that clicking an image opens it in a new tab while preserving self-contained output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript, python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100