getgauge / html-report

HTML report generation plugin for Gauge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to add custom HTML tags to report via Gauge.writeMessage or similar

ryudice opened this issue · comments

We store video recordings in Amazon S3, we would like to link to them somehow in the reports, is there currently a supported way to do this?

Hi,
I think you can try something like this
GaugeMessages.WriteMessage("<img src='data:image/png;base64," + Convert.ToBase64String(TakeScreenShot()) + "'/>");
I use that to put an screenshot in the html report.

@ryudice Have you tried @Lemadd solution of using <img> inside write GaugeMessages.WriteMessage?

@Lemadd you can also take screenshots during execution using GaugeScreenshots.Capture()

Hi @zabil that does not work if I use a selenium hub or a headless browser.
If it's a bug I can file bug, but not really sure.

For selenium hub and headless browsers you can implement a custom screenshot handler to override the default screenshot behaviour.
More details here https://docs.gauge.org/latest/writing-specifications.html#taking-custom-screenshots

Hi @Apoorva-GA @zabil I am also facing this issue at the moment. I have tried the solution mentioned by @joyep-jojo wherein I am putting the img tag within the Gauge.writeMessage method, but in the html report, the image is not getting displayed. When I add the same html snippet in a simple html file, I do get the image. Not sure why is this happening?

Gauge version: 1.4.3
java - 0.10.3
Html-report - 4.3.0