This project is a Selenium 4 automation framework built using Java, Maven, and TestNG, following the Page Object Model (POM) design pattern.
The purpose of this framework is to demonstrate:
- Clean automation architecture
- End-to-end test design
- Stable suite execution
- Real-world automation decision making
The framework is validated using:
- SauceDemo (stable demo application – guaranteed pass)
- Amazon (used only to discuss real-world automation constraints)
- Java 11
- Selenium WebDriver 4
- TestNG
- Maven
- WebDriverManager
- Chrome (Incognito mode for stability)
- Eclipse IDE
amazon-selenium-framework │ ├── pom.xml ├── testng.xml ├── README.md ├── screenshots │ └── src ├── main │ └── java │ └── com.amazon.automation │ ├── base │ │ └── BaseTest.java │ ├── pages │ │ ├── LoginPage.java │ │ ├── ProductsPage.java │ │ ├── CartPage.java │ │ └── MenuPage.java │ └── utils │ ├── DriverFactory.java │ └── ScreenshotUtil.java │ └── test └── java └── com.amazon.automation.tests └── SauceDemoE2ETest.java
- Launch application
- Login with valid credentials
- Verify products page
- Add product to cart
- Verify cart contents
- Logout
- Verify user is returned to login page
This represents a true end-to-end flow, covering both functional validation and session handling.
SauceDemo is a demo application specifically designed for automation testing:
- No captcha or OTP
- Stable DOM
- Predictable behavior
- Widely accepted in interviews
This ensures:
- Reliable execution
- Consistent green test runs
- Focus on framework quality rather than site restrictions
Amazon was explored to understand real-world challenges such as:
- Captcha and bot detection
- Dynamic UI rendering
- Browser security popups
- Delivery and checkout constraints
Production e-commerce sites are not test environments.
This framework intentionally avoids automating checkout on live systems.
Amazon is used only for explanation and discussion, not as a passing E2E demo.
- Right-click
testng.xml - Select Run As → TestNG Suite
- smoke – critical E2E flow
- regression – extended coverage
Execution is controlled via testng.xml, similar to real CI pipelines.
- Screenshots are automatically captured on test failure
- Screenshots are stored in the
/screenshotsfolder - Useful for debugging and CI analysis
To avoid browser-level interruptions:
- Chrome is launched in incognito mode
- Password manager and security popups are disabled using ChromeOptions
This reflects real-world automation best practices.
- Page Object Model (POM)
- Explicit waits (WebDriverWait)
- TestNG suite & group execution
- Screenshot capture on failure
- Browser configuration via ChromeOptions
- End-to-end test design
- Why POM was chosen
- Difference between test class vs suite execution
- Handling browser-level popups
- Why checkout is excluded on production sites
- How this framework can scale in CI/CD
This project is for learning and interview demonstration purposes only.
It does not attempt to bypass or violate any website security mechanisms.
Vidya Prabhakar Chavan
QA Automation Engineer