When I try to upgrade ExtentReports from 3.X to version 4.X. The following code breaks.
private static ExtentReports createInstance() {
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(htmlReportPath+htmlFileName);
htmlReporter.loadXMLConfig(new File(extentConfigFilePath));
extent = new ExtentReports();
extent.attachReporter(htmlReporter);
return extent;
}
The code should pass, but it throws an error:
Demo.java:[4,44] incompatible types: java.io.File cannot be converted to java.lang.String
When I try to upgrade ExtentReports from 3.X to version 4.X. The following code breaks.
The code should pass, but it throws an error: