anshooarora / extentreports-java

Community version of Extent API for Java has moved to https://github.com/extent-framework/
http://extentreports.com
Other
528 stars 318 forks source link

Anyone here, how to change body background extentreports version 3.0.6 ? #880

Closed VirTuanNguyen closed 7 years ago

VirTuanNguyen commented 7 years ago

in version 3.0.6, the background is too dark. I have to tried to changed it using:

String css = "body { background: #eceff5; font-size: 13px; height: 100%; overflow: hidden; };";

m_HtmlReporter.config().setCSS(css);

--> It isn't working.

Please., thanks

anshooarora commented 7 years ago

What do you mean? Are you using the dark theme or standard? Please share config.xml.

VirTuanNguyen commented 7 years ago

Hi anshooarora, it's great! below is the details of code:

private static void initHTMLReports() { m_HtmlReporter = new ExtentHtmlReporter("PantheraReport.html"); m_HtmlReporter.config().setDocumentTitle("Panthera"); m_HtmlReporter.config().setEncoding("UTF-8"); m_HtmlReporter.config().setProtocol(Protocol.HTTPS); m_HtmlReporter.config().setReportName("PantheraTestReport"); m_HtmlReporter.config().setTestViewChartLocation(ChartLocation.TOP); m_HtmlReporter.config().setTheme(Theme.DARK);

String css = "body { background: #eceff5; font-size: 13px; height: 100%; overflow: hidden; };";
m_HtmlReporter.config().setCSS(css);

}

Expected: Background of body will change. I don't know how to get it. Thanks anshooarora.

anshooarora commented 7 years ago

Simply remove this line:

m_HtmlReporter.config().setTheme(Theme.DARK);

or use:

m_HtmlReporter.config().setTheme(Theme.STANDARD);