This document provides a deep dive into the internal structure and design decisions of the QA Hub Framework.
The BasePage class is the foundation of our Page Object Model. It encapsulates common Selenium operations with built-in explicit waits.
Key Methods:
find_element(locator, timeout): Safe element retrieval with error handling.click(locator): Waits for element to be clickable before interacting.send_keys(locator, text): Safely inputs text after clearing the field.is_visible(locator): Verification utility for assertions.
A singleton engine that centralizes configuration loading from multiple sources.
Hierarchy:
- Environment Variables (Highest Priority)
.envFile (Secrets)- Environment-Specific Config (
config.staging.yaml) - Base Config (
config.yaml)
Centralizes the creation of the WebDriver instance, pulling settings directly from the ConfigManager.
Features:
- Standard Chrome options for stability.
- Headless mode toggle for local vs CI execution.
- Sandboxing and GPU disabling for Docker compatibility.
A collection of reusable Behave steps that can be shared across multiple feature files to avoid duplication.
By separating the UI structure (Locators and Page Objects) from the test logic (Steps and Features), we achieve:
- High Maintainability: UI changes only require updates in one place.
- Improved Readability: Tests read like natural language.
The framework prioritizes Explicit Waits via WebDriverWait to ensure tests are fast and reliable, avoiding the pitfalls of arbitrary sleep times.
The framework is tested and optimized for:
- Local Development: Windows/Mac with GUI.
- CI/CD Pipelines: Linux runners (Ubuntu) using headless Chrome.
- Docker: Containerized execution with
--no-sandboxenabled by default.