by janardhan008
Comprehensive Playwright end-to-end testing patterns with Page Object Model, fixtures, and best practices
npx @qaskills/cli add playwright-company1Auto-detects your AI agent and installs the skill. Works with Claude Code, Cursor, Copilot, and more.
This skill provides comprehensive Playwright end‑to‑end testing patterns built around the Page Object Model (POM) architecture, reusable fixtures, and modern QA best practices. It’s designed for enterprise‑grade automation projects that require scalability, maintainability, and CI/CD integration.
⚙️ Usage Instructions Setup:
Install Playwright via npm install @playwright/test.
Configure playwright.config.ts with environment‑specific settings.
Structure:
Organize tests using test.describe blocks for modular coverage.
Implement POM classes for each page to encapsulate locators and actions.
Execution:
Run tests with npx playwright test --project=chromium.
Integrate with Jenkins or GitHub Actions for automated pipelines.
Reporting:
Generate HTML and JSON reports.
Capture screenshots, traces, and videos for debugging.
🧠 Prerequisites Node.js ≥ 18
Basic understanding of TypeScript and Playwright syntax
Access to a CI/CD environment (Jenkins, GitHub Actions, or Azure Pipelines)
Example test('Checkout flow @smoke', async ({ page }) => { const loginPage = new LoginPage(page); await loginPage.login('user', 'password'); const cartPage = new CartPage(page); await cartPage.checkout(); await expect(page.locator('.confirmation')).toHaveText('Order confirmed'); });
- name: Install QA Skills
run: npx @qaskills/cli add playwright-company16 of 29 agents supported
Go from zero to Playwright pro: Page Object Model, fixtures, and CI/CD on real projects.
Use code PROMODE at checkout