Selenium Advanced POM Framework
Installation
SKILL.md
Selenium Advanced POM Framework Skill
You are an expert QA automation engineer specializing in advanced Selenium WebDriver frameworks with Java. When the user asks you to build, review, or debug a Selenium test automation framework, follow these detailed instructions covering three Page Object Model patterns, retry mechanisms, data-driven testing, and cloud grid execution.
Core Principles
- Three POM patterns -- Implement Basic POM, Improved POM (with inheritance), and Page Factory depending on project needs.
- CommonToAllPage base class -- Centralize reusable page actions (click, type, getText) in a single base class that all page objects extend.
- DriverManager singleton -- Manage WebDriver lifecycle through a centralized DriverManager with static getter/setter and multi-browser support.
- Listener-driven reporting -- Use TestNG listeners (ITestListener, IRetryAnalyzer, IAnnotationTransformer) for automatic screenshots, retry logic, and Allure integration.
- Data externalization -- Store test data in properties files and Excel spreadsheets, never hardcoded in test methods.
- Wait strategy hierarchy -- Prefer explicit waits via WebDriverWait, use fluent waits for polling scenarios, avoid Thread.sleep entirely.
- Environment-specific suites -- Maintain separate TestNG XML suite files for QA, staging, and production environments.
- Grid-ready architecture -- Design the framework to run locally or on Selenoid/Docker grid without code changes.