This project implements a layered UI automation framework with Selenium, TestNG, Page Object Model, configuration support, logging, Extent reports, and screenshot capture for failed tests.
src/main/java/com/framework/base: browser setup, test setup, and generic page wrapperssrc/main/java/com/framework/pages: application layer using Page Object Modelsrc/main/java/com/framework/utils: configuration, waits, screenshots, and Extent helperssrc/test/java/com/framework/tests: TestNG test layersrc/test/java/com/framework/listeners: report and screenshot hookssrc/test/resources:config.propertiesandlog4j2.xml
Run the normal suite with testng.xml for passing and functional tests.
Run the failure demo suite to intentionally fail a test and confirm screenshot capture:
After execution, inspect:
test-output/screenshotsfor the saved imagetest-output/ExtentReport/extent-report.htmlfor the attached screenshot in the failed test entry