Getting Errors while adding ExtentManager.java class | Selenium Forum
M
Posted on 10/12/2016
Hi Team,

I am getting errors while adding Extentmanager.java class to my project. can some one pls help to correct .

import java.io.File;
import java.util.Date;

import com.relevantcodes.extentreports.DisplayOrder;
import com.relevantcodes.extentreports.ExtentReports;

public class ExtentManager {
private static ExtentReports extent;

public static ExtentReports getInstance() {
if (extent == null) {
Date d=new Date();

extent = new ExtentReports("c:\\report\\"+fileName, true, DisplayOrder.NEWEST_FIRST);


extent.loadConfig(new File(System.getProperty("user.dir")+"//ReportsConfig.xml"));
// optional
extent.addSystemInfo("Selenium Version", "2.53.0").addSystemInfo(
"Environment", "QA");
}
return extent;
}
}

I am getting options to create ExtentReport class and change the extent to Element type. Pls help me to correct it.

M
Replied on 11/12/2016

I guess you did not include all the jars in project


M
Replied on 12/12/2016

Included all the jars.


M
Replied on 12/12/2016

what jar file i need to add to make extent reports work correctly.


M
Replied on 13/12/2016

Are you using pom.xml?


M
Replied on 14/12/2016

Hi, I am also getting the same error and also I couldn't find jars 'extentreports.jar' and 'freemarker.jar'. Also not available in downloaded code.


M
Replied on 18/12/2016

what are the errors?