I'm trying generate reports for the selenium test script. but unable import "ExtentHtmlReporter" packages to the class.

enter image description here

added dependencies as below


and extent-config.xml file as below

<?xml version="1.0" encoding="UTF-8"?>
<!-- report theme --> <!-- standard, dark --> 

<!-- document encoding --> <!-- defaults to UTF-8 --> 
<!-- protocol for script and stylesheets --> <!-- defaults to https --> 

<!-- title of the document --> 
<documentTitle>ExtentReports 2.0</documentTitle>

<!-- report name - displayed at top-nav --> 

<!-- report headline - displayed at top-nav, after reportHead- line -->
<reportHeadline>Automation Report</reportHeadline>

<!-- global date format override --> <!-- defaults to yyyy-MM-dd--> 

<!-- global time format override -->
<!-- defaults to HH:mm:ss -->

<!-- custom javascript -->
    <![CDATA[ $(document).ready(function() {});]]> 

<!-- custom styles --> 


ExtentHtmlReporter, ExtentLoggerReporter The ExtentHtmlReporter and ExtentLoggerReporter were deprecated in series 4.1.x and have been removed in version 5. The replacement is ExtentSparkReporter, which is comprehensive, ports all features along with a host of new ones.

ExtentSparkReporter spark = new ExtentSparkReporter("Spark.html");

Found the solution. Need to downgrade the extent report version. downgraded to 4.0.9 and it works for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.