A beginner-friendly Playwright automation project implementing Page Object Model for testing Demoblaze e-commerce workflows.
๐ DemoBlaze Playwright Automation Framework (POM Architecture)
An end-to-end UI automation framework built using Playwright and JavaScript, implementing the Page Object Model (POM) design pattern.
This project demonstrates scalable test architecture, CI integration, and automation best practices for modern web applications.
๐ Application Under Test: https://www.demoblaze.com
๐ Overview
This framework automates core user flows of the DemoBlaze e-commerce application, focusing on:
Authentication validation UI visibility checks Session handling (Login / Logout) Stable locator strategies CI-based automated execution
The framework is designed to be:
โ Scalable โ Maintainable โ CI/CD Ready โ Industry-standard compliant
๐๏ธ Architecture & Design Pattern ๐น Page Object Model (POM)
Each page is abstracted into a reusable class that:
โ Encapsulates locators โ Encapsulates page actions โ Improves readability โ Reduces duplication โ Enhances maintainability
This approach ensures clean separation between:
Test Logic Page Interactions
Configuration
๐ Project Structure DemoBlazePlaywrightPOMProject โ โโโ .github/workflows/ โ โโโ playwright.yml # CI pipeline configuration โ โโโ pages/ # Page Object Classes โ โโโ LoginPage.js โ โโโ HomePage.js โ โโโ tests/ # Test Specifications โ โโโ LoginTest.spec.js โ โโโ HomePageTest.spec.js โ โโโ playwright.config.js # Playwright configuration โโโ package.json โโโ package-lock.json โโโ README.md
๐ ๏ธ Tech Stack Tool Purpose โ Playwright UI Automation โ JavaScript Test scripting โ Node.js Runtime environment โ GitHub Actions CI/CD โ HTML Reporter Test reporting
โ๏ธ Setup & Installation
1๏ธโฃ Clone Repository git clone https://github.com/rincy-r3876/DemoBlazePlaywrightPOMProject.git cd DemoBlazePlaywrightPOMProject
2๏ธโฃ Install Dependencies npm install
3๏ธโฃ Install Playwright Browsers npx playwright install
4๏ธโฃ Execute Tests npx playwright test
5๏ธโฃ View Test Report npx playwright show-report
๐งช Test Coverage โ Login Feature
Successful login validation Welcome username visibility Session validation โ Home Page Feature Logout link visibility Post-login UI validation
๐ Continuous Integration (CI)
This project integrates with GitHub Actions to automatically: Install dependencies Install Playwright browsers Execute test suite Generate reports
Fail build if:
Tests fail .only is committed (via forbidOnly)
Workflow file:
.github/workflows/playwright.yml
CI ensures production-ready code quality and prevents accidental test isolation.
๐ Production-Safe Configuration
The framework uses:
forbidOnly: !!process.env.CI
This prevents accidental commits of:
test.only() describe.only()
Ensuring:
Full test suite always runs in CI No partial test execution in production pipelines
๐ Key Automation Best Practices Implemented
Page Object Model (POM) Explicit waits over hard waits Centralized configuration CI-driven execution Clean locator strategies Structured test organization Scalable folder architecture
๐ Scalability Potential
This framework can be extended to include:
Data-driven testing API integration testing Parallel cross-browser execution Docker containerization Advanced reporting (Allure) Environment-based configurations Test tagging & selective execution
๐ฉโ๐ป Author
Rincy Mol R QA | Playwright Enthusiast