November 6, 2020

How to customize report name instead of Index.html/ Dashboard.html when using latest versions of extent report

  November 6, 2020

 If anyone is using the new version of Extent report may have seen that now we are getting two HTML files instead of one

  • Dashboard.html
  • Index.html
And it will be created in the given path but not in the name we provided with the ExtentHtmlReporter instance.


As a fix, we can use the ExtentV3HtmlReporter which will give the older format of having a single report HTML file.

This is method is depreciated as of now, but as a quick fix, we can use the below method.
The new code is given as commented along with working the fix.

	ExtentV3HtmlReporter htmlReporter = new ExtentV3HtmlReporter(reportPath+reportName);

	//   New method for name change (Pending clarification - bug fix)
	// 	 ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(reportPath);
	//   htmlReporter.Config.ReportName = reportname
	//   ExtentHtmlReporterConfiguration repConfig = new ExtentHtmlReporterConfiguration(htmlReporter);
	//   repConfig.ReportName = reportname;
Will keep this blog updated with new developments on this topic.
logoblog

Thanks for reading How to customize report name instead of Index.html/ Dashboard.html when using latest versions of extent report

Previous
« Prev Post

No comments:

Post a Comment

Fixing javascript error: Cannot read properties of null (reading 'querySelector') issue when using CSS identifier in selenium

 JavaScript is another way to interact with web elements when normal selenium methods fail to act. But one issue with javascript is, it does...