Roshni Sinha
Roshni Sinha

Reputation: 13

"The constructor ExtentReports(String, boolean) is undefined"

I am getting "The constructor ExtentReports(String, boolean) is undefined" message while creating object of extentreport class.

public  ExtentReports reports;
public ExtentTest test;

@BeforeTest
public void setExtend() {
        reports = new ExtentReports(System.getProperty("user.dir")+"/test-output/reports.html",true);   
}

Upvotes: 1

Views: 911

Answers (2)

MASUM RAZA
MASUM RAZA

Reputation: 15

Update the Extent Report latest version. And please read the documentation care fully they explained very good way. Go through the documentation https://www.extentreports.com/docs/javadoc/com/aventstack/extentreports/ExtentReports.html

Upvotes: 0

OscarRyz
OscarRyz

Reputation: 199225

I'm not sure what API ExtentReports belongs to, but if is this one:

https://www.extentreports.com/docs/javadoc/com/aventstack/extentreports/ExtentReports.html

It does not indeed include the constructor ExtentReport(String,boolean) you're using, it only has a parameterless constructor.

Upvotes: 1

Related Questions