-
Notifications
You must be signed in to change notification settings - Fork 767
Return base64 image in case of EMBED #1923
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
base: master
Are you sure you want to change the base?
Conversation
This can be useful in case if someone wants to reuse the image i.e set test message or set suite documentation
@hsj51 Could you explain a bit more the idea behind returning the string "EMBED" and give an example of how this change would be used? |
Changes I have suggested is to return the base64 string of the image instead of the word 'EMBED'. This will enable user to reuse the image somewhere else in the report. Below is an example use case: Setting for EMBED
And add below lines to this function
Then this is what a report may look like This will allow an user to view the screenshots in the report itself and not search for it in the log file through a mountain of keywords. Main goal for this change is reusability of the images. Current alternative for this is to use .png images, but then there will be multiple files to manage and sharing report become difficult. |
@emanlove I have tried to explain my changes and a possible use cases. Please feel free to reach out for any more queries |
Alright, I see better your use case. And appreciate you highlighting the issue of writing to file and then "there will be multiple files to manage and sharing report become difficult". I do wonder if the solution might be added functionality to rebot to do this in a post processing step? Let me think about this a bit more. I think having other opinions could also be good here. If you have an account on the Robot Framework community, could you share your idea and reasons for it within the #seleniumlibray channel. If you don't have an account I could post there as well. |
@hsj51 @emanlove We had similar requirement and applied same change in our local Observation: Report size got increased from 3mb to 30mb due to embed screenshot in test message. Due to this report not loaded for long time We have around 2k tests and around 400 tests has embed images (failed tests) I tried couple of approaches like flatten, remove keywords but report file size not decreased. Thought of sharing my observation before accepting this change |
This can be useful in case if someone wants to reuse the image i.e set test message or set suite documentation