0
0
Selenium Javatesting~10 mins

Extent report customization in Selenium Java - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an ExtentReports object.

Selenium Java
ExtentReports extent = new ExtentReports();
extent.attachReporter(new [1]("Extent.html"));
Drag options to blanks, or click blank then click option'
AWebDriver
BLogger
CExtentHtmlReporter
DTestNG
Attempts:
3 left
💡 Hint
Common Mistakes
Using WebDriver or TestNG classes instead of ExtentHtmlReporter.
Not attaching any reporter to ExtentReports.
2fill in blank
medium

Complete the code to create a test entry in the Extent report.

Selenium Java
ExtentTest test = extent.[1]("Login Test");
Drag options to blanks, or click blank then click option'
AinitTest
BcreateTest
CstartTest
DbeginTest
Attempts:
3 left
💡 Hint
Common Mistakes
Using deprecated methods like startTest.
Using incorrect method names that do not exist.
3fill in blank
hard

Fix the error in the code to log a pass status in the test report.

Selenium Java
test.log(Status.[1], "Login successful");
Drag options to blanks, or click blank then click option'
APASS
BFAIL
CERROR
DSKIP
Attempts:
3 left
💡 Hint
Common Mistakes
Using FAIL or ERROR instead of PASS.
Using lowercase status names.
4fill in blank
hard

Fill both blanks to configure the report file path and attach the reporter.

Selenium Java
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter([1]);
extent.[2](htmlReporter);
Drag options to blanks, or click blank then click option'
A"test-output/extent.html"
BattachReporter
CsetReporter
D"output/report.html"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect method names like setReporter.
Not using quotes around the file path.
5fill in blank
hard

Fill all three blanks to create a test, log a fail status, and flush the report.

Selenium Java
ExtentTest test = extent.[1]("Checkout Test");
test.log(Status.[2], "Checkout failed due to error");
extent.[3]();
Drag options to blanks, or click blank then click option'
AcreateTest
BFAIL
Cflush
DstartTest
Attempts:
3 left
💡 Hint
Common Mistakes
Using startTest instead of createTest.
Logging PASS instead of FAIL for failure.
Forgetting to flush the report.