Skip to content

Samlordson/Playwright_HRM_WebAutomation_Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playwright HRM Automation Framework

Overview

This is a scalable Playwright + TypeScript automation framework developed using the Page Object Model (POM) design pattern for web UI automation.

The framework focuses on reusable components, maintainability, data-driven testing, and session management.


Tech Stack

  • Playwright
  • TypeScript
  • Page Object Model (POM)
  • JSON Data Driven Testing
  • Storage State Authentication
  • Node.js
  • Git
  • GitHub

Framework Features

  • Page Object Model Architecture
  • Reusable BasePage
  • JSON Data Provider
  • Environment Configuration
  • Storage State Login
  • Session Reuse
  • Cross Browser Execution
  • Parallel Execution
  • Retry Mechanism
  • HTML Report
  • Screenshot Utility
  • Modular Test Design

Project Structure

PLAYWRIGHT_HRM_FRAMEWORK

├── auth
│   └── state.json

├── pages
│   ├── BasePage.ts
│   ├── LoginPage.ts
│   ├── DashboardPage.ts
│   ├── AdminPage.ts
│   ├── LeavePage.ts
│   ├── AttendancePage.ts
│   ├── Reports.ts
│   └── ...

├── tests
│   ├── auth
│   │   ├── auth.setup.spec.ts
│   │   └── create-session.spec.ts
│   │
│   └── IproA
│       ├── Tc_001_checkin.spec.ts
│       ├── Tc_002_navigation.spec.ts
│       ├── Tc_003_applycl.spec.ts
│       └── ...

├── playwright.config.ts

└── package.json

Authentication

This framework uses Playwright Storage State.

Instead of logging in before every test, the authenticated session is saved once and reused across all test cases.

Benefits

  • Faster execution
  • Stable authentication
  • Reduced login time
  • Suitable for regression suites

Test Modules

Current automated modules include

  • Login
  • Dashboard Navigation
  • Attendance
  • Leave
  • Reports
  • Project Setup
  • Work From Home
  • Shift Roster
  • My Sheet
  • User Management

Reports

Supports

  • Playwright HTML Report
  • Screenshots on Failure
  • Trace Viewer

Generate report

npx playwright show-report

Run Tests

Run all tests

npx playwright test

Run Chromium

npx playwright test --project=chromium

Run Firefox

npx playwright test --project=firefox

Run specific test

npx playwright test tests/IproA/Tc_001_checkin.spec.ts

Run headed mode

npx playwright test --headed

Design Highlights

  • Reusable BasePage
  • Page Object Model
  • Storage State Authentication
  • Modular Test Structure
  • Easy to Extend
  • Maintainable Framework

Planned Enhancements

  • Allure Reporting
  • GitHub Actions CI/CD
  • API Automation Integration
  • Faker Test Data
  • Logger Utility
  • Fixtures
  • Environment Switching
  • Docker Integration
  • Jenkins Pipeline

Author

Samlordson R B

QA Automation Engineer

Skills

  • Playwright
  • Selenium
  • TypeScript
  • Java
  • REST Assured
  • API Testing
  • Appium
  • Git
  • CI/CD

About

Production-ready Playwright + TypeScript automation framework using Page Object Model (POM), Storage State Authentication, JSON Data-Driven Testing, Cross-Browser Execution, HTML Reporting, and Scalable Test Architecture for HRM applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors