Skip to content
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

Add support for base64 inline images in html report #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

penDerGraft
Copy link

@penDerGraft penDerGraft commented Aug 9, 2016

In a continuous delivery environment, test reports might be saved in a central location (e.g. nexus, etc.) for record-keeping/tracking purposes. In the event that these types of reports are shared across teams, it would nice to be able to send failure reports (or any report for that matter) to a group using a simple url, without needing to keep up with a screenshots directory. Obviously, it could be sent as a zip, but this requires you to unzip it, and open the html file in the browser.

This PR adds an inlineImages property to the initialization options that writes the images inline using base64 encoding. Webdriver's browser.takeScreenshot method returns a base64 string anyway, this just uses that string in the html instead of a file reference. The result is one output html file containing the encoded screenshots.

@penDerGraft
Copy link
Author

In certain situations the last screenshot was not being captured in the report. I think this was occasionally happening before (see #8), but it was definitely happening when trying to use the inlineImages option.

I think this has to do with angular/protractor#1938. The most recent changes should fix these issues in the reporter.

@hanwen-yang
Copy link

Can we get this merged. This would be super helpful!

@hsdhott
Copy link

hsdhott commented Oct 9, 2019

Any update on if we can get this PR merged?

@jbobo
Copy link

jbobo commented Oct 9, 2019

@Kenzitron Is this project still active? My team's using this library in our OSS project for e2e tests, and being able to store screenshots directly in the HTML reports is a feature that we'd be very excited to have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants