-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can not embed image on windows hosts using extra.png(image) #214
Comments
Thanks for reporting this! @Uil2liv And thanks for the detailed repro stuff, that's great! Now, I just need to source a windows machine so I can run it, haha. Quick question:
should be
Just a typo? |
Hi, Not a typo, it appears that WebElement.screenshot_as_base64 is a property (https://seleniumhq.github.io/selenium/docs/api/py/_modules/selenium/webdriver/remote/webelement.html#WebElement.screenshot_as_base64) |
In new asset name: - Strip leading and trailing spaces - Replace inner spaces by underscores - Replace double colons by hyphens - Remove all characters except alphanums, underscores, hyphens, dots and slashes - Adapt path to system
Hit the same problem on windows, whenever you hit a test failure it wants to write out the results file and tries to create a file with the "::" in the file name which fails and the entire test run stops. The change causing the problem occurred between between 1.20.0 and 1.21.0 |
I'm pretty sure this and #215 and #216 share the same root cause. Hopefully I'll have some time tonight to check on this. I'm sorry it's taking a while to address properly. The excuse I have is that I don't own a windows machine - so I have to go through the wonderful and joyous task of setting up a windows VM with python... I'm sure I'll manage, but if someone has a link to an article that will take me through it - please share. Because sharing is caring. ❤️ |
Again, sorry for the delay. Would you mind testing out PR #223 and see if that solves the issues you've been seeing? Much appreciated! |
@BeyondEvil Thanks for that fix 👍 |
Awesome, thanks @Uil2liv ! |
On a windows host, we cannot add an image to a report using
pytest_html.extras.png()
.It returns the following error:
The behaviour is not observed on a Linux system
It might be due to:
Here is a sample to reproduce the behaviour:
tests/conftest.py:
tests/sample_test.py
then run:
The text was updated successfully, but these errors were encountered: