Closed bothikarsk closed 2 years ago
try using scenario.log().
Well scenario.log() is just adding the html as plain text . Html interpretation is not happening.
I am expecting it to be added as table. For e.g in cucumber masterthought report html table is added for same step. If possible please check if this can be done in pdf report
In pdf report just plain text is added
Got it now. Interesting. Will try for next release.
Thank you
@grasshopper7 Hope all is well with you. Please let me know whenever mime type text/html is supported by pdf report.
Thanks, Santosh.
Have not looked at in great detail, but it seems to be a big task. There is a artifact available which does the conversion of html to pdf snippets but the main issue is the space constraint of the PDF page. Will have a detailed look, by the end of this week. Then will be able to make a decision. Thx.
Thank you. Please do let me know what you decide.
Hi... Unfortunately the artifact I thought would do the job will not work, as overflow and splitting needs to be handled.
Will have to use jsoup to parse the html table contents and create a pdf table manually. This will be cropped lengthwise to fit the page. A similar display if you use a large datatable. Also the number of rows maybe an issue. The html display will only work for tables.
Will give it a try, if it works then should take around 7-10 days.
Thank you for looking into this. Hope that will work. Appreciate your help.
Thanks, Santosh.
Hi, Any luck with the approach you wanted to give it try?
Thnx
Have been kind off busy. Do u need this for your professional work? If so will attempt it this weekend.
Yes need this for my professional work. I am using this plug in to generate pdf and sending same to team in email. Team is looking for additional details and verification in report which are configured with mimetype text/html.
I would appreciate if you could take a look at it..
Thanks, Santosh.
An initial implementation is available in repository (2.9.0). It will only support simple table html, no spans or any other stuff. The html snippet has to begin with "<table". I have to put in checks and add a default text display in case of trouble.
U can try it by building the code. U will need a 3 jars. Just follow the POM dependencies trail.
Should be available in Maven in a couple of days if all goes well.
Version 2.9.0 has been uploaded. Should be replicated to Maven soon.
Thank you. I will update to latest version and let you know.
Hello, Thank you for all the effort and time you spent on this thread.
Hope all is well with you. Apologies. I was off the work all these while so could not check and respond.
I have tried with maven version 2.9.1 but still observing same behaviour.(Warning with message mime type text/html not supported).
Would you be able to check and advise ?
Thank you again !.
Thanks, Santosh.
Getting warning mime type text/html not supported for scenario.attach(byte [] data, "text/html", "name" ) . Html is not added to step definition in extent pdf report. I am using io.cucumber 6.9.1 version.