playwright-pom

Create and extend Playwright Page Object Model classes with TypeScript path aliases.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/qtpsudhakar/pwjan19pom --skill playwright-pom-qtpsudhakar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-pom
Source: https://github.com/qtpsudhakar/pwjan19pom/tree/main/.github/skills/playwright-pom
Command: npx skills add https://github.com/qtpsudhakar/pwjan19pom --skill playwright-pom-qtpsudhakar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create or extend Playwright Page Object Model classes to simplify UI test automation by providing a structured, reusable pattern for pages, locators, and actions; it enforces consistency across tests and reduces duplication.

Core Features & Use Cases

  • Create or extend Playwright POM classes for new pages (e.g., LoginPage, DashboardPage)
  • Enforce a BasePage contract and shared helpers (WebHelpers/AssertHelpers)
  • Use TypeScript path aliases for clean imports and maintainable code
  • Organize page objects with a clear template and locator description patterns

Quick Start

Create your first page object by extending BasePage and importing it into tests to start using the POM pattern.

Frequently Asked Questions about playwright-pom

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Playwright tests using the Page Object Model pattern?

Structure Playwright tests using the Page Object Model pattern by creating page classes like LoginPage that extend a BasePage contract, wrapping locators and actions to reduce duplication and enforce test consistency.

What's the best way to reduce code duplication in Playwright UI automation?

Reduce code duplication in Playwright UI automation by organizing page objects with shared helpers like WebHelpers and AssertHelpers, enforcing a consistent BasePage contract and locator description patterns across all tests.

How do I create reusable page objects for Playwright UI tests?

Create reusable page objects for Playwright UI tests by extending a BasePage class, defining locators with description patterns, and implementing action plus verification methods to build consistent test interfaces.

Do I need TypeScript path aliases to maintain scalable Playwright page objects?

TypeScript path aliases are required to maintain scalable Playwright page objects, enabling clean imports and ensuring maintainable code structure across shared helpers and extended BasePage classes.

Can I use existing Playwright page classes with a BasePage contract?

You can extend existing Playwright page classes by integrating them with a BasePage contract, applying shared WebHelpers and AssertHelpers, and adopting TypeScript path aliases for consistent test interfaces.

Why does my Playwright test architecture lack consistency across different pages?

Playwright test architecture lacks consistency when pages do not enforce a BasePage contract, missing structured locator description patterns, action plus verification logic, and shared helpers to reduce duplication.