The AutomationFrameworkSelenium is a production-grade test automation framework for web applications using Selenium WebDriver 4.37.0, Java 17, and TestNG 7.11.0. The framework is built by Anh Tester and maintained at github.com/anhtester/AutomationFrameworkSelenium
Core Architecture Components:
| Layer | Key Classes | Purpose |
|---|---|---|
| Build System | pom.xml, FrameworkConstants, config.properties | Maven-based dependency management with 25+ libraries |
| Driver Management | DriverManager, BrowserFactory, TargetFactory | ThreadLocal WebDriver management supporting local and remote execution |
| Keyword Engine | WebUI, external keywords Git submodule | 200+ reusable automation keywords wrapping Selenium API |
| Test Execution | BaseTest, TestListener, AllureListener | TestNG-based lifecycle management with dual listener support |
| Page Objects | CommonPageCRM, ClientPageCRM, SignInPageCRM, LoginPageCMS | Page Object Model implementation for CRM and CMS applications |
| Data Management | ExcelHelpers, DataProviderManager, JsonUtils, DataFakerUtils | Multi-source test data handling (Excel, JSON, synthetic data) |
| Reporting | ExtentReportManager, AllureManager, TelegramManager, EmailSendUtils | Multi-channel reporting (HTML, PDF, Allure, Telegram, Email) |
| Utilities | CaptureHelpers, LogUtils, ZipUtils, FileHelpers | Screenshot capture, logging, file operations, compression |
Execution Modes:
BrowserFactory enum (CHROME, EDGE, FIREFOX, SAFARI)TargetFactory with Docker Compose supportThis overview provides a high-level introduction to framework architecture and capabilities. Detailed subsystem documentation is available in dedicated pages covering build configuration (page 2), core architecture (page 3), configuration system (page 4), test execution (page 5), reporting (page 6), helper utilities (page 7), and CI/CD integration (page 8).
Sources: README.md1-28 pom.xml7-12 pom.xml23-70 CHANGELOG.txt1-6
The AutomationFrameworkSelenium implements a nine-layer architecture with clear separation of concerns. Each layer encapsulates specific functionality and exposes well-defined interfaces to adjacent layers.
The diagram illustrates the complete framework organization with importance scores derived from code frequency metrics. The Build & Configuration Layer (importance: 139.25) forms the foundation with pom.xml managing 25+ Maven dependencies and config.properties centralizing runtime settings. The WebUI Abstraction Layer (importance: 69.59) is critical, consisting of an external Git submodule (github.com/anhtester/keywords.git) providing reusable keyword implementations that are exposed through the WebUI static class. The CI/CD & Infrastructure layer (importance: 33.15) automates the entire pipeline through GitHub Actions and supports distributed execution via Docker Selenium Grid.
Sources: pom.xml1-296 README.md236-587 src/main/java/com/anhtester/constants/FrameworkConstants.java src/main/java/com/anhtester/keywords/WebUI.java src/main/java/com/anhtester/driver/ src/test/java/com/anhtester/common/BaseTest.java src/test/java/com/anhtester/listeners/TestListener.java
The framework orchestrates test execution through a well-defined sequence of component interactions, from browser initialization through test execution to report generation.
This sequence diagram traces the complete execution path from Maven command invocation through test execution to multi-channel report generation. Key aspects include:
DriverManager stores WebDriver instances in ThreadLocal storage, enabling safe parallel test executionDataProviderManager integrates with ExcelHelpers to feed test data from Excel files (e.g., ClientsDataExcel.xlsx)WebUI applies multiple wait conditions (waitForElementVisible, waitForElementClickable, waitForPageLoaded) before element interactionsTestListener (ExtentReports) and AllureListener (Allure) capture test results independentlyTestListener.onFinish() triggers report generation, compression (via ZipUtils), and distribution (via TelegramManager)Sources: src/test/java/com/anhtester/common/BaseTest.java src/main/java/com/anhtester/driver/DriverManager.java src/main/java/com/anhtester/driver/BrowserFactory.java src/main/java/com/anhtester/driver/TargetFactory.java src/main/java/com/anhtester/keywords/WebUI.java src/test/java/com/anhtester/listeners/TestListener.java src/test/java/com/anhtester/listeners/AllureListener.java src/test/java/com/anhtester/dataprovider/DataProviderManager.java
The framework provides comprehensive testing capabilities across eight functional domains, each with specific implementation classes and configuration options.
| Feature Category | Key Classes and Files | Capabilities and Configuration |
|---|---|---|
| Test Execution | TestNG 7.11.0BaseTestTestListenerAllureListener | - Parallel suite execution (thread-count in XML)- Method-level parallelization ( parallel="methods")- Test lifecycle hooks ( @BeforeMethod/@AfterMethod)- Retry failed tests via IRetryAnalyzer- Custom @FrameworkAnnotation for metadata |
| Browser Management | DriverManagerBrowserFactory enumTargetFactoryconfig.properties | - Multi-browser support: CHROME, EDGE, FIREFOX, SAFARI - Headless mode ( HEADLESS=true)- Local execution ( TARGET=local)- Remote execution ( TARGET=remote, REMOTE_URL, REMOTE_PORT)- ThreadLocal WebDriver for parallel safety |
| Keyword Library | WebUI static classkeywords Git submodulegithub.com/anhtester/keywords.git | - 200+ automation keywords - Navigation: openWebsite(), navigateToUrl(), refreshPage()- Interaction: clickElement(), setText(), selectOptionByText()- Wait strategies: waitForElementVisible(), waitForPageLoaded(), smartWait()- Verification: verifyElementPresent(), verifyElementTextEquals(), softAssert()- Advanced: screenshotElement(), Authentication(), dragAndDropHTML5() |
| Data Management | ExcelHelpersDataProviderManagerJsonUtilsPropertiesHelpersDataFakerUtilsnet.datafaker:datafaker 2.4.4 | - Excel file reading (setExcelFile(), getCellData(), getDataHashTable())- JSON parsing ( JsonUtils.get(key))- Properties file loading ( PropertiesHelpers.loadPropertiesFile())- CSV support via Apache POI - Synthetic data generation ( DataFakerUtils wrapping DataFaker library)- TestNG @DataProvider integration |
| Reporting & Notifications | ExtentReportManagerAllureManagerTelegramManagerEmailSendUtilscom.aventstack:extentreports 5.1.2io.qameta.allure:allure-testng 2.29.1 | - ExtentReports HTML/PDF output (exports/ExtentReports/)- Allure JSON results ( target/allure-results/)- Telegram Bot notifications ( SEND_REPORT_TO_TELEGRAM=yes)- Email reports with SMTP ( SEND_EMAIL_TO_USERS=yes)- Screenshot attachment to reports - Test counters and execution summary |
| Capture & Recording | CaptureHelpersScreenRecoderHelperscom.github.stephenc.monte:monte-screen-recorder 0.7.7.0 | - Screenshot capture (captureScreenshot(), getScreenshot())- Conditional capture: SCREENSHOT_PASSED_STEPS, SCREENSHOT_FAILED_STEPS, SCREENSHOT_SKIPPED_STEPS, SCREENSHOT_ALL_STEPS- Video recording ( VIDEO_RECORD=yes)- Screenshot export to exports/ExportData/Images/- Video export to exports/ExportData/Videos/ |
| Logging | LogUtilslog4j2.propertiesorg.apache.logging.log4j:log4j-core 2.24.3 | - Log4j2 framework integration - Console appender (StdoutAppender) - Rolling file appender ( exports/logs/applog.log)- Time-based rotation (daily) - Size-based rotation (10MB trigger) - 20 archived logs retention - Methods: LogUtils.info(), LogUtils.pass(), LogUtils.error() |
| Configuration & Constants | FrameworkConstantsPropertiesHelpersConfigFactoryconfig.propertiesdata.properties | - Centralized constants: URL_CRM, URL_CMS_ADMIN, URL_CMS_USER- Wait timeouts: WAIT_IMPLICIT, WAIT_EXPLICIT, WAIT_PAGE_LOADED, WAIT_SLEEP_STEP- Browser settings: BROWSER, HEADLESS, REMOTE_URL, REMOTE_PORT- Report paths: EXTENT_REPORT_FOLDER, ALLURE_RESULTS_PATH- Notification config: TELEGRAM_TOKEN, TELEGRAM_CHATID, email credentials- Property file loading at runtime via PropertiesHelpers |
Sources: README.md9-27 pom.xml72-296 src/main/java/com/anhtester/keywords/WebUI.java src/main/java/com/anhtester/helpers/ExcelHelpers.java src/main/java/com/anhtester/report/ExtentReportManager.java src/main/java/com/anhtester/report/AllureManager.java src/main/java/com/anhtester/report/TelegramManager.java src/main/java/com/anhtester/helpers/CaptureHelpers.java src/main/java/com/anhtester/utils/LogUtils.java src/main/java/com/anhtester/constants/FrameworkConstants.java
The framework has evolved continuously since April 2022, with regular updates maintaining compatibility with latest Selenium releases and browser versions through Chrome DevTools Protocol (CDP) updates.
| Version | Release Date | Selenium Version | CDP Support | Key Changes and Class Updates |
|---|---|---|---|---|
| v2.6.5 | Oct 22, 2025 | 4.37.0 | CDP 141 | Current version. Updated WebUI keyword class |
| v2.6.2 | Jul 19, 2025 | 4.34.0 | CDP 138 | Maintained CDP compatibility |
| v2.6.1 | Jun 13, 2025 | 4.33.0 | CDP 137 | Selenium update |
| v2.6.0 | May 05, 2025 | 4.32.0 | CDP 136 | Updated FileHelpers, SystemHelpers, ExcelHelpers classes. Upgraded all library versions |
| v2.5.0 | Feb 23, 2025 | 4.29.0 | CDP 133 | Reorganized package structure to com.anhtester.reports |
| v2.4.9 | Jan 25, 2025 | 4.28.1 | CDP 132 | Selenium version update |
| v2.4.8 | Dec 17, 2024 | 4.27.0 | CDP 131 | Enhanced waitForElementVisible() in WebUI class |
| v2.4.7 | Nov 1, 2024 | 4.26.0 | CDP 130 | Selenium update |
| v2.4.6 | Oct 29, 2024 | 4.25.0 | - | Fixed headless mode on Jenkins Server Linux. Updated dependencies |
| v2.4.5 | Sep 7, 2024 | - | - | Optimized WebUI keyword methods. Removed QR Code handling (google.zxing) |
| v2.4.4 | Sep 5, 2024 | 4.24.0 | CDP 128 | Selenium update |
| v2.4.3 | Aug 14, 2024 | 4.23.1 | - | Upgraded all libraries to latest versions |
| v2.4.2 | Jul 26, 2024 | 4.23.0 | CDP 127 | Updated CDP support in WebUI keyword |
| v2.4.1 | Jun 24, 2024 | 4.22.0 | CDP 126 | Updated CDP implementation in WebUI |
| v2.4.0 | May 22, 2024 | - | - | Added screenshot for all steps. Updated config.properties |
| v2.3.0 | May 17, 2024 | 4.21.0 | CDP 125 | Updated CDP Network in WebUI |
| v2.0.0 | Sep 27, 2023 | 4.13.0 | - | Added javadoc for all WebUI keyword functions |
| v1.9.4 | May 25, 2023 | 4.9.1 | - | Added DataFaker library. Added retry failed test via IAnnotationTransformer. Added CMS test cases. Fixed headless mode |
| v1.9.3 | Jan 28, 2023 | 4.8.0 | CDP v109 | Fixed Allure Report screenshot attachment with TestNG > 7.4.0. Added AllureListener implementing TestLifecycleListener |
| v1.9.0 | Nov 8, 2022 | 4.6.0 | - | Introduced Selenium Manager for auto-download of browser binaries. Removed WebDriverManager from BrowserFactory. Updated Selenium Grid config |
| v1.8.0 | Sep 19, 2022 | - | - | Added Telegram Bot integration via TelegramManager. Added dragAndDropHTML5() in WebUI. Added verifyDownloadFile() |
| v1.7.0 | Aug 11, 2022 | 4.4.0 | - | Changed to Page Object Model pattern. Removed object properties files in favor of class-based locators |
| v1.6.0 | Jul 25, 2022 | 4.3.0 | - | Added complete verify functions in WebUI. Removed IE browser support. Added smartWait, video recording, zip folder config |
| v1.4.0 | May 18, 2022 | - | - | Added LanguageUtils class. Added SCREENSHOT_ALL_STEPS config. Added Authentication using Selenium 4. Added QR Code handling |
| v1.3.0 | May 9, 2022 | 4.1.4 | - | Added LocalStorageUtils. Added window/tab handling, screenshotElement(), printPage() in WebUI |
| v1.0.0 | Apr 5, 2022 | - | - | Initial release with parallel test execution, Extent/Allure reports, email notifications, video recording, Excel data reading |
Core Dependencies:
Reporting Libraries:
Data Processing:
.xlsx) file handlingCommunication:
Utilities:
Build Configuration:
Sources: CHANGELOG.txt1-345 pom.xml23-70 pom.xml72-296 README.md31-32
The framework provides multiple entry points for different use cases and execution scenarios:
Sources: README.md48-55 src/test/resources/suites/ structure from README
Refresh this wiki
This wiki was recently refreshed. Please wait 2 days to refresh again.