
Write HTML. Render video. Built for agents.
This repo packages a Playwright testing setup for web and mobile flows, with Page Object Model structure, visual diffs, accessibility checks, and security-focused test folders. It also includes MCP and chatmode files for agent-guided debugging and test workflows.

Builders who want reusable Playwright patterns for web, mobile, and AI-assisted test work.
You can run maintainable browser tests with shared page objects, visual checks, and agent-friendly workflows.
Keeps selectors and page actions in `tests/pages/` and shared test data in `tests/data/`.
Includes unit, integration, E2E, performance, security, accessibility, resilience, contract, and chaos tests under `tests/`.
Provides MCP run support plus `.github/chatmodes/` and `.claude/skills/` files for agent workflows.
Uses `tools/compare.js` with `pixelmatch` and `demo/baseline.png` to compare screenshots and create diffs.
Runs tests against Chromium, Firefox, WebKit, and mobile emulation projects in `playwright.config.ts`.
Includes `Dockerfile`, `docker-compose.yml`, and `.github/workflows/ci.yml` for repeatable test runs.
cd ~/Playwright-AI-Agent-POM-MCP-Server npm install npx playwright install
npm outdated
git clone <your-fork-url> cd Playwright-AI-Agent-POM-MCP-Server npm install npx playwright install --with-deps
git checkout -b feature/your-feature-name
npm test npx playwright test tests/your-new-test.spec.ts
git commit -m "feat: add visual regression for login page"
Enterprise-grade Playwright test automation framework by Padmaraj Nidagundi, Senior QA Automation Engineer with 8+ years of experience in test automation architecture. This production-ready framework showcases motion assertions, perceptual diffs, and CI-friendly E2E testing patterns used in real-world enterprise projects. Trusted by QA professionals for interviews, production deployments, and test automation best practices.
⭐ Used by 500+ QA engineers worldwide | 🏆 Featured in Playwright community showcase | 🔒 Security-audited
Battle-tested patterns from production environments:
requestAnimationFrame timestamps and compute timing gaps to assert animation health. Used to validate 60fps performance in financial trading dashboards.pixelmatch with baseline image workflow and diff artifacts. Catches visual regressions before production deployment.playwright.config.ts with embedded webServer for the local demo. Zero-configuration local development experience.| Category | Technology/Library | Version | Purpose |
|---|---|---|---|
| Language | TypeScript | - | Used for test files, configuration, and utilities |
| Runtime | Node.js | 20.19+ | Recommended for warning-free install with latest lint/test tooling |
| Testing Framework | Playwright | - | For end-to-end and unit testing |
| Build Tool | npm | - | For dependency management and scripts |
| Library | @playwright/test | ^1.61.1 | Main Playwright testing library for browser automation and assertions |
| Library | @pact-foundation/pact | ^17.0.1 | For contract testing (API consumer-provider agreements) |
| Library | @types/node | ^26.1.0 | TypeScript type definitions for Node.js |
| Library | @typescript-eslint/* | ^8.62.1 | TypeScript linting parser and plugin |
| Library | axe-playwright | ^2.2.2 | Accessibility testing integration with Axe |
| Library | eslint | ^10.6.0 | Linting and static analysis |
| Library | prettier | ^3.9.4 | Code formatting |
| CI/CD | GitHub Actions | - | Configured for cross-platform testing on Ubuntu and Windows |
| Visual Diffing | Pixelmatch | - | Custom tools for pixel-level comparison |
| MCP/Chatmode | - | - | Integration hints for AI-assisted debugging |
| Configuration | Playwright config | - | For multi-browser support (Chromium, Firefox, WebKit) |
Playwright-AI-Agent-POM-MCP-Server/
├── demo/ # Demo site served by dev-server.js
│ ├── index.html # Animated UI with window.sampleAnimationFrames()
│ └── baseline.png # Visual baseline for perceptual diffs
├── tests/
│ ├── pages/ # Page Objects
│ │ └── WeSendCVPage.ts # WeSendCV page object with locators & methods
│ ├── data/ # Centralized test data
│ │ ├── urls.ts # URL constants
│ │ └── users.ts # User test data
│ ├── unit-tests/ # Unit tests - API & utility functions
│ │ └── api.spec.ts # Basic API operations
│ ├── integration-tests/ # Integration tests - E2E workflows
│ │ └── workflow.spec.ts # Complete user journeys
│ ├── performance-tests/ # Performance tests - Load times & metrics
│ │ └── load-time.spec.ts # Response times & network performance
│ ├── security-tests/ # Security tests - Auth & access control
│ │ └── auth.spec.ts # Authentication & authorization checks
│ ├── validation-tests/ # Validation tests - Input validation
│ │ ├── broken-links.spec.ts # Broken link detection
│ │ ├── input-validation.spec.ts # Data integrity & format validation
│ │ └── invalid-route.spec.ts # Invalid route handling
│ ├── mock-tests/ # Mock tests - Response stubbing
│ │ └── api-mocking.spec.ts # API mocking & error handling
│ ├── interop-tests/ # Interop tests - Cross-browser compatibility
│ │ └── compatibility.spec.ts # Feature compatibility across browsers
│ ├── accessibility/ # Accessibility tests - a11y & keyboard navigation
│ │ ├── a11y.spec.ts # Axe accessibility checks
│ │ └── keyboard.spec.ts # Keyboard navigation tests
│ ├── resilience/ # Resilience tests - Resource failure handling
│ │ └── resource-failure.spec.ts # Asset failure simulation
│ ├── network-resilience/ # Network resilience tests - Offline handling
│ │ └── offline.spec.ts # Offline/network failure tests
│ ├── i18n-tests/ # i18n tests - Localization & translations
│ │ └── i18n.spec.ts # Language attributes & basic translations
│ ├── e2e/ # E2E tests - Critical-path flows
│ │ └── e2e.spec.ts # End-to-end user journeys
│ ├── chaos-tests/ # Chaos tests - Concurrency & robustness
│ │ └── concurrency.spec.ts # Concurrent user simulation
│ ├── contract-tests/ # Contract tests - API contract validation
│ │ └── api-contract.spec.ts # API contract checks
│ ├── mobile.spec.ts # Mobile testing example with device emulation
│ ├── vibe.spec.ts # Animation timing + perceptual diff test
│ └── wesendcv.spec.ts # Smoke + negative tests (uses POM + data)
├── tools/
│ ├── compare.js # Pixelmatch-based diff comparator CLI
│ └── dev-server.js # Static HTTP server for demo/
├── .github/
│ ├── skills/ # Agent Skills for GitHub Copilot
│ │ └── playwright-test-debugging/ # Test debugging skill
│ │ └── SKILL.md # Systematic debugging workflow guide
│ ├── chatmodes/ # Chatmode prompts for LLM agents
│ │ ├── 🎭 healer.chatmode.md
│ │ ├── 🎭 planner.chatmode.md
│ │ └── ...
│ ├── copilot-instructions.md # Repository-wide Copilot instructions
│ └── workflows/
│ └── ci.yml # GitHub Actions multi-OS pipeline
├── playwright.config.ts # Playwright configuration (browsers, timeouts, traces)
├── package.json # NPM scripts and dependencies
└── README.md # This file
| File | Purpose |
|---|---|
tests/pages/WeSendCVPage.ts | Page Object for WeSendCV site with locators, navigation, and assertion methods |
tests/data/urls.ts | Centralized URL constants for WeSendCV and other test targets |
tests/wesendcv.spec.ts | Test specs using POM + data (smoke & negative tests) |
tests/mobile.spec.ts | Mobile testing example with device emulation |
tests/vibe.spec.ts | Animation timing + perceptual diff test |
tools/compare.js | CLI comparator — creates baseline if missing, writes diff.png |
demo/index.html | Animated demo UI exposing window.sampleAnimationFrames(durationMs) |
playwright.config.ts | Multi-browser projects, webServer config, trace/screenshot retention on failure |
Use local project dependencies via npx so runs are reproducible across machines and CI.
cd C:\Playwright-AI-Agent-POM-MCP-Server
# Install dependencies exactly from lockfile (recommended for reproducibility)
npm ci
# Install Playwright browsers and OS dependencies
npx playwright install --with-deps
# Verify installation
npx playwright test --version
cd ~/Playwright-AI-Agent-POM-MCP-Server
npm install
npx playwright install
npm outdated
This repository includes first-class Docker support for running Playwright tests in a consistent containerized environment.
Dockerfile — Playwright-ready image that installs dependencies and runs npm test.dockerignore — excludes heavy local artifacts from image build contextdocker-compose.yml — one-command test execution with persisted reports# Build image
docker build -t playwright-ai-agent-tests:local .
# Run all tests
docker run --rm -it playwright-ai-agent-tests:local
# Persist reports locally
docker run --rm -it `
-v ${PWD}/playwright-report:/app/playwright-report `
-v ${PWD}/test-results:/app/test-results `
playwright-ai-agent-tests:local
# Build and run tests
docker compose up --build
# Clean up containers after run
docker compose down
npm test
Runs the full suite across all configured browsers (Chromium, Firefox, WebKit, Mobile Chrome, Mobile Safari).
npx playwright test tests/wesendcv.spec.ts
npx playwright test tests/performance-tests/
npx playwright test tests/security-tests/
npx playwright test tests/vibe.spec.ts --headed --project=chromium
npx playwright test --debug
npx playwright run-test-mcp-server
Enables programmatic test healing and chatmode flows (see chatmode section).
npm test
Matches the GitHub Actions pipeline test command.
# Test on Mobile Chrome (Pixel 5 emulation)
npx playwright test tests/mobile.spec.ts --project="Mobile Chrome"
# Test on Mobile Safari (iPhone 12 emulation)
npx playwright test tests/mobile.spec.ts --project="Mobile Safari"
# Run mobile tests on all mobile projects
npx playwright test tests/mobile.spec.ts --project="Mobile Chrome" --project="Mobile Safari"
Start the demo server for manual testing or local development:
node tools/dev-server.js
# Open http://127.0.0.1:3000 in your browser
The tools/compare.js tool performs pixel-level diffs using pixelmatch.
First run (baseline creation):
node tools/compare.js demo/baseline.png artifacts/current.png artifacts/diff.png --threshold=0.03
Subsequent runs (comparison):
current.png against baseline.png.diff.png highlighting pixel differences.Best practice: Commit demo/baseline.png to the repo after visual approval.
The .github/workflows/ci.yml pipeline:
npm ci and npx playwright install --with-depsnpm test on ubuntu-latest and windows-latestFor deterministic visual diffs in CI, always commit baselines locally after approval.
Security Testing Integration:
npm audit in CISecurity Test Categories:
tests/security-tests/ (e.g., XSS, CSRF, auth)tests/contract-tests/ include negative cases for auth and input validationCI/CD Enhancements:
.github/workflows/ci.yml includes jobs for security audit and secrets scanning: security-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Run npm audit
run: npm audit --audit-level=high
secrets-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Scan for secrets
uses: trufflesecurity/trufflehog@v3.56.3
Sample Security Test:
See tests/security-tests/xss.spec.ts for an XSS prevention test example.
Security Policy:
Tests automatically run on every push to main and develop branches, and on all pull requests.
Features:
What happens on commit:
View test results:
| Test Category | Type | Purpose | Location |
|---|---|---|---|
| Unit Tests | Positive | Test individual functions and utilities in isolation | tests/unit-tests/ |
| Integration Tests | Positive | Validate complete end-to-end user workflows | tests/integration-tests/ |
| Performance Tests | Positive | Measure response times, load metrics, and resource efficiency | tests/performance-tests/ |
| Security Tests | Positive | Validate authentication, authorization, and secure access | tests/security-tests/ |
| Validation Tests | Positive | Test input validation, data integrity, and format validation | tests/validation-tests/ |
| Mock Tests | Positive & Negative | Test error handling via response mocking and stubbing | tests/mock-tests/ |
| Interop Tests | Positive | Verify cross-browser compatibility and feature support | tests/interop-tests/ |
| Accessibility Tests | Positive | Catch ARIA/contrast/keyboard issues | tests/accessibility/ |
| Resilience Tests | Positive & Negative | Simulate failed/slow responses and verify UI error states | tests/resilience/ |
| Network-resilience Tests | Negative | Simulate offline/network failure and verify graceful handling | tests/network-resilience/ |
| i18n Tests | Positive | Verify translations, RTL layouts, and pluralization | tests/i18n-tests/ |
| E2E Tests | Positive | Full user journeys (signup, purchase, upload) using POM | tests/e2e/ |
| Chaos Tests | Positive | Simulate concurrent users or DB failures for robustness | tests/chaos-tests/ |
| Contract Tests | Positive | Ensure frontend/backend API compatibility | tests/contract-tests/ |
| Vibe Test | Positive | Validate animation timing and visual consistency via perceptual diffs | tests/vibe.spec.ts |
| WeSendCV Smoke | Positive | Verify homepage loads with expected content | tests/wesendcv.spec.ts |
| WeSendCV 404 | Negative | Validate proper 404 error handling on invalid routes | tests/wesendcv.spec.ts |
This repository demonstrates 13 categories of testing to provide comprehensive quality coverage:
tests/unit-tests/)npx playwright test tests/unit-tests/tests/integration-tests/)npx playwright test tests/integration-tests/tests/performance-tests/)npx playwright test tests/performance-tests/tests/security-tests/)npx playwright test tests/security-tests/tests/validation-tests/)npx playwright test tests/validation-tests/tests/mock-tests/)npx playwright test tests/mock-tests/tests/interop-tests/)npx playwright test tests/interop-tests/tests/accessibility/)npx playwright test tests/accessibility/tests/resilience/)npx playwright test tests/resilience/tests/network-resilience/)npx playwright test tests/network-resilience/tests/i18n-tests/)npx playwright test tests/i18n-tests/tests/e2e/)npx playwright test tests/e2e/tests/chaos-tests/)npx playwright test tests/chaos-tests/This project follows the Page Object Model pattern for maintainable, scalable tests.
tests/pages/): Encapsulate selectors, navigation, and page-specific actionstests/data/): Centralized constants (URLs, test users, products, etc.)tests/*.spec.ts): Use page objects and data, focus on test logic and assertionsPage Object (tests/pages/WeSendCVPage.ts):
export class WeSendCVPage {
readonly url = URLS.wesendcv.base;
async gotoHomepage() { /* ... */ }
async verifyHomepageLoaded() { /* ... */ }
async gotoInvalidPage(path: string) { /* ... */ }
}
Test Data (tests/data/urls.ts):
export const URLS = {
wesendcv: {
base: 'https://wesendcv.com',
invalidPage: '/invalid-page-that-does-not-exist',
},
};
Test Spec (tests/wesendcv.spec.ts):
test('homepage loads', async ({ page }) => {
const wesendcvPage = new WeSendCVPage(page);
const resp = await wesendcvPage.gotoHomepage();
expect(resp?.ok()).toBeTruthy();
});
Sign in to join the discussion.
No comments yet. Be the first to say what this is good for.

Write HTML. Render video. Built for agents.
Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
SkillOpt is a text-space optimizer that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts.

Omnigent is an open-source AI agent framework and meta-harness: orchestrate Claude Code, Codex, Cursor, Pi, and custom agents — swap harnesses without rewriting, enforce policies and sandboxing, and collaborate in real time from any device.
A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!