-
Notifications
You must be signed in to change notification settings - Fork 318
[Extent 3.0.1] base64 string image won't display on lightbox #715
Comments
Base64 images are currently not supported in this version due to issues they have caused on the previous versions and ExtentX. Due to the amount of space they take (these can be extremely long strings) - they blow up the size of the HTML file and also slow down queries in ExtentX. There have been similar requests earlier but I do not plan to add this feature in version 3 due to the above. Or, maybe I will add it and not support issues that arise out of it. I am leaning more towards the latter, will update this thread soon with my decision. |
We might have to look this problem in a different way. The |
@savatagean , @email2vimalraj @anshooarora
Reducing the size of the screenshots:
}` Now call the function: Result: In my case, for a mobile screenshot , the original size may be around 1MB or more. With the processing as given above the size of the screenshot comes down to very very less size of around 10 to 30KB only. Adding inline screenshot images in Extent 3.0 <ul class='screenshots'> Hope that helps. |
Thank you guys for your answers. I switched back to v2.4. But @SrinivasTangella I will try it and tell if it works or not. |
@savatagean By the by, I have forgot to mention that while capturing the screenshot do it as below: File scrFile = ((TakesScreenshot) getDriver()).getScreenshotAs(OutputType.FILE); It should work. Because I had similar issue and the fix I have mentioned is what I have currently implemented and working. |
Hi Anshoo. Any update on Base64 image support for version 3.x? I email the reports out to clients who don't have shared folder access, and this is the only way I know to give them screenshots in the report. |
Hi @anshooarora, |
@anshooarora |
This feature will be part of 3.0.7. |
When will 3.0.7 will be available and with that will the screenshot be displayed in extentx as well ? |
Hi @anshooarora,
I was able to create a base64string image on report with the following code:
String base64Screenshot = "data:image/png;base64,"+ ((TakesScreenshot)driver.getScreenshotAs(OutputType.BASE64);
test.log(Status.FAIL, "Test Failed", test.addScreenCapture(base64Screenshot));
Though it shows the screenshot on test report, lightbox won't work and displays blank page.
The text was updated successfully, but these errors were encountered: