Skip to content

Naveen-Ravichandran003/selenium-automation-ricepot-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Selenium Automation Framework - RICEPOT Prompt Method

Enterprise-Grade Selenium BDD Framework designed using the RICEPOT Prompt Method.


πŸ“Œ Project Overview

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.

✨ Key Features

  • 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 by WebDriverWait.
  • Auto-Reporting: Rich HTML reports with embedded screenshots.

πŸ—οΈ Architecture & Workflow

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
Loading

πŸ›οΈ The RICEPOT Method – Implementation Overview

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.

❓ What Is RICEPOT?

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.

🎯 Why Use RICEPOT?

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

🧩 RICEPOT Prompt Breakdown

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

πŸ’‘ Pro Tip

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.

βš”οΈ Generic Prompt vs. RICEPOT Prompt

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

πŸ§ͺ Test Scenarios

πŸ“ 1. Verify Login Page Elements

  • Objective: Ensure critical UI components (Username, Password, Login) are visible.
  • Outcome: 🟒 PASS | Evidence: Screenshot taken.

πŸ“ 2. Invalid Login Attempt

  • Objective: Verify error messaging for incorrect credentials.
  • Outcome: 🟒 PASS | Evidence: Error validation screenshot.

πŸ“Š Test Execution Evidence

Execution Summary

Total Tests Status Success Rate
2 βœ… PASS 100%

HTML Report Access

The framework generates a detailed HTML report for every run:

🌐 View Online Live Report (Click Here)

Screenshots

Login Elements Verification Invalid Login Error Validation
Login Verify Invalid Login

πŸ“ Project Structure

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

πŸ› οΈ Setup & Execution

Prerequisites

  • Java: JDK 21+
  • Build Tool: Maven
  • Browser: Google Chrome

Commands

# Clean and run all tests
mvn clean test

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ by Naveen Ravichandran

About

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 using RICEPOT Prompt Method.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors