3

I been using the base64 image for screenshots to be attached in my HTML extent report.

The code i been using is given below.

Screenshot file = ((ITakesScreenshot)driver).GetScreenshot();
string image = file.AsBase64EncodedString;

exTest.Fail(msg, MediaEntityBuilder.CreateScreenCaptureFromBase64String(image).Build());
System.Diagnostics.Trace.WriteLine("FAIL >>>>  " + msg);

This is giving an extent report with relative path to my screenshot image as below.[Which is my expectation]

Extent report with Base64 image button

Here instead of image, A Base 64 button is showing. I need to see a thumbnail of image instead of that button and still the image should be Base64 (Not related to HTML file). Please help me to achieve this.

Edit: I am using extent report C# v3.1.3

shaz sanz
  • 29
  • 4

0 Answers0