Enterprise-Grade Selenium BDD Framework designed using the RICEPOT Prompt Method.
This project implements a robust Selenium Automation Framework for Salesforce login validation. It leverages the Page Object Model (POM) architecture integrated with Cucumber BDD and TestNG, ensuring scalability, maintainability, and high-quality reporting.
- BDD Excellence: Gherkin-based scenarios for business readability.
- POM Design: Modular Page Objects using Selenium
PageFactory. - ID-Only Locators: Enhanced stability by strictly using unique ID attributes.
- Smart Waits: Zero
Thread.sleep(); powered byWebDriverWait. - Auto-Reporting: Rich HTML reports with embedded screenshots.
graph TD
User((QA Engineer)) -->|Executes| TestRunner[TestRunner / Runner.java]
TestRunner -->|Triggers| TestNG{TestNG Suite}
TestNG -->|Runs| Cucumber[Cucumber Features]
subgraph "Test Layer (BDD)"
Cucumber -->|Steps| LoginSteps[LoginSteps.java]
LoginSteps -->|Uses| LoginPage[LoginPage.java]
LoginSteps -->|Hooks| Hooks["@Before / @After"]
end
subgraph "Core Layer (Selenium)"
LoginPage -->|Locates| Elements["@FindBy ID"]
LoginPage -->|Actions| WebDriver[Selenium WebDriver]
WebDriver -->|Interacts| Browser(Chrome Browser)
end
subgraph "Reporting & Evidence"
Hooks -->|Captures| Screenshots[Screenshots PNG]
Cucumber -->|Generates| HTMLReport[Cucumber HTML Report]
Cucumber -->|Generates| JSONReport[Cucumber JSON Report]
end
This framework is built using advanced prompt engineering based on the RICEPOT methodology.
Unlike generic prompts that require multiple retries and corrections, RICEPOT enables the AI to produce a complete, enterprise-grade automation framework in a single iteration.
The result is not a collection of disconnected scripts, but a cohesive, production-ready automation system designed to meet enterprise engineering standards from the first generation.
RICEPOT is a structured prompt-design methodology created for complex, high-impact technical work, including enterprise automation frameworks and production-level software systems.
It provides a disciplined way to guide AI behavior so that the output reflects real-world engineering practices, not experimental or generic solutions.
RICEPOT helps the AI clearly understand what needs to be built and how it should be built. It prevents hallucinations and avoids generating generic or incorrect code.
By using RICEPOT, the AI verifies all rules and constraints before writing any code, ensuring the output follows real project and enterprise standards.
Frameworks generated using RICEPOT are:
- β
More Stable
- Enforce ID-based element identification
- Rely on explicit wait strategies rather than timing shortcuts
- β
Easier to Maintain
- Follow strict Page Object Model (POM) principles
- Use modular, decoupled components suitable for long-term growth
- β
More Reliable
- Designed with defensive execution patterns
- Built to enterprise standards from the first iteration
The table below illustrates how each RICEPOT component contributes to a single-pass, enterprise-grade framework:
| Component | Definition | Key Objective | Application in This Project |
|---|---|---|---|
| R β Role | Persona Adoption | Establishes expertise and authority | Senior QA Architect (15+ years) specializing in CRM & Salesforce automation |
| I β Instructions | Core Directives | Defines tools and implementation strategy | Java, Cucumber, TestNG, Maven, PageFactory |
| C β Context | Environment Scope | Guides architectural decisions | Salesforce CRM login with A/B testing resilience |
| E β Example | Pattern Reference | Enforces consistency | ID-only locator examples using @FindBy(id = "...") |
| P β Parameters | Constraints & Rules | Establishes quality gates | No Thread.sleep(), no commented code, defensive execution |
| O β Output | Structural Format | Controls deliverables | Page Objects, Feature Files, Step Definitions, Runner, pom.xml |
| T β Tone | Communication Style | Aligns output expectations | Technical, concise, production-ready |
RICEPOT ensures the AI doesnβt just generate codeβit engineers a system.
It enforces decisions that matter in real projects, such as locator stability, execution reliability, framework scalability, and CI/CD compatibility.
| Feature | Generic Prompt | RICEPOT Prompt |
|---|---|---|
| Output Style | Snippet-based or partial | Full enterprise framework (POM + BDD) |
| Wait Strategy | Thread.sleep() |
Explicit waits only |
| Locator Quality | XPath/CSS (brittle) | ID-only (high stability) |
| Code Quality | High technical debt | Production-ready |
| Scalability | Difficult to evolve | Modular and CI/CD ready |
- Objective: Ensure critical UI components (Username, Password, Login) are visible.
- Outcome: π’ PASS | Evidence: Screenshot taken.
- Objective: Verify error messaging for incorrect credentials.
- Outcome: π’ PASS | Evidence: Error validation screenshot.
| Total Tests | Status | Success Rate |
|---|---|---|
| 2 | β PASS | 100% |
The framework generates a detailed HTML report for every run:
π View Online Live Report (Click Here)
| Login Elements Verification | Invalid Login Error Validation |
|---|---|
![]() |
![]() |
Project Root
βββ src/
β βββ main/java/.../pages/ # Page Objects (LoginPage.java)
β βββ test/java/.../steps/ # Step Definitions (LoginSteps.java)
β βββ test/java/.../runners/ # Test Runners (Runner.java)
β βββ test/resources/features/ # Gherkin Features (.feature)
βββ reports/ # Tracked HTML Reports
βββ screenshots/ # Tracked Execution Screenshots
βββ target/ # Build Artifacts (Ignored)
βββ pom.xml # Maven Dependencies
βββ testng.xml # TestNG Config
βββ README.md # Documentation
- Java: JDK 21+
- Build Tool: Maven
- Browser: Google Chrome
# Clean and run all tests
mvn clean testThis project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by Naveen Ravichandran

