playwright-e2e

playwright-e2e is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 36 tokens per session (3,693 once invoked), scanned A, original, MIT.

A guide to end-to-end testing of web applications with Playwright, a browser-testing framework. End-to-end tests follow real user actions, such as signing in, browsing, or completing a purchase.

In plain words
What is it for?
Use it to write, review, and debug tests with page objects, selectors, assertions, waits, fixtures, isolated test data, and organised test files.
Why use it?
It helps replace fragile tests and fixed delays with readable tests that wait for the page correctly and use stable ways to identify controls.

Skill for Claude CodeCodex

Part of the qa-essentials plugin — 10 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pramoddutta/qaskills/playwright-e2e
Any agent
npx skills add PramodDutta/qaskills --skill playwright-e2e
Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills

Made for: Claude Code, Codex.

Or install qa-essentials, the plugin that ships this one along with the rest of its 10 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for playwright-e2e

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/playwright-e2e.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/playwright-e2e)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/playwright-e2e"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/playwright-e2e.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,693 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.03693
Opus 5 $0.00018 $0.01847
Sonnet 5 $0.00007 $0.00739
Haiku 4.5 $0.00004 $0.00369

Measured 4d ago against content hash 3974599ec338, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

playwright-e2e scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/qa-essentials/skills/playwright-e2e/SKILL.md · 501 lines

How it starts

The opening of the file, as written. The whole thing — 501 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Playwright E2E Testing Skill

You are an expert QA automation engineer specializing in Playwright end-to-end testing. When the user asks you to write, review, or debug Playwright E2E tests, follow these detailed instructions.

Core Principles

  1. User-centric testing -- Always write tests from the user's perspective. Tests should mirror real user journeys.
  2. Resilient selectors -- Prefer getByRole, getByText, getByLabel, getByTestId over CSS/XPath selectors.
  3. Auto-waiting -- Leverage Playwright's built-in auto-waiting. Avoid explicit waitForTimeout.
  4. Isolation -- Each test must be independent. Never rely on state from a previous test.
  5. Readability -- Tests are documentation. Write them so a new team member can understand the intent.

Project Structure

Always organize Playwright projects with this structure:

tests/
  e2e/
    auth/
      login.spec.ts
      signup.spec.ts
    dashboard/
      dashboard.spec.ts
    checkout/
      cart.spec.ts
      payment.spec.ts
  fixtures/
    auth.fixture.ts
    db.fixture.ts
  pages/
    login.page.ts
    dashboard.page.ts
    base.page.ts
  utils/
    test-data.ts
    helpers.ts
playwright.config.ts

Page Object Model

Always implement the Page Object Model (POM). Each page class encapsulates selectors and actions for a single page or component.

Base Page Class

import { Page, Locator } from '@playwright/test';

export abstract class BasePage {
  readonly page: Page;

  constructor(page: Page) {
    this.page = page;
  }

  async navigate(path: string): Promise<void> {
    await this.page.goto(path);
  }

  async waitForPageLoad(): Promise<void> {
    await this.page.waitForLoadState('networkidle');
  }

  async getTitle(): Promise<string> {
    return this.page.title();
  }

  async takeScreenshot(name: string): Promise<Buffer> {
    return this.page.screenshot({ path: `screenshots/${name}.png`, fullPage: true });
  }
}

Concrete Page Class

import { Page, Locator, expect } from '@playwright/test';
import { BasePage } from './base.page';

export class LoginPage extends BasePage {
  readonly emailInput: Locator;
  readonly passwordInput: Locator;
  readonly submitButton: Locator;
  readonly errorMessage: Locator;
  readonly forgotPasswordLink: Locator;

  constructor(page: Page) {
    super(page);
    this.emailInput = page.getByLabel('Email');
    this.passwordInput = page.getByLabel('Password');
    this.submitButton = page.getByRole('button', { name: 'Sign in' });
    this.errorMessage = page.getByRole('alert');
    this.forgotPasswordLink = page.getByRole('link', { name: 'Forgot password?' });
  }

  async goto(): Promise<void> {
    await this.navigate('/login');
  }

  async login(email: string, password: string): Promise<void> {
    await this.emailInput.fill(email);
    await this.passwordInput.fill(password);
    await this.submitButton.click();
  }

  async expectErrorMessage(message: string): Promise<void> {
    await expect(this.errorMessage).toBeVisible();
    await expect(this.errorMessage).toHaveText(message);
  }
}

Read the full file on GitHub · 501 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 501 lines · 36 tokens per session scan A 3974599ec338

Subscribe to this mod's changes

playwright-e2e is a skill published in the GitHub repository PramodDutta/qaskills (214 stars, last pushed 4d ago), licensed MIT. It adds 36 tokens to every session and 3,693 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

aginxbrowser

Browser engine for AI agents: fetch JS-rendered and Cloudflare-protected pages as clean markdown, run 5-engine aggregated web search (Baidu, Bing, Sogou, WeChat, Google), take screenshots as visual input, extract structured data from SPAs, and drive multi-step interactions (click, type, fill forms, login, paginate)…

yinnho/aginxbrowser · 297 tokens

playwright-execute

Run Playwright tests or suites and upload the resulting report to Katalon True Platform. Use when you need to execute Playwright scripts, package scripts, spec files, projects, or suites, configure or verify @katalon/playwright-reporter, upload Playwright reports with Katalon CLI/reporter commands, and verify uploaded…

katalon-labs/true-skills · 122 tokens

peek

Use when the user mentions a recent browser session, an error they just reproduced, "what was the user doing before X", DOM state at some past moment, or wants to turn a manual repro into a Playwright test. Peek exposes 18 MCP tools backed by a local SQLite store of rrweb-captured browser sessions.

Cubenest/rrweb-stack · 67 tokens

thinkbrowse-cli

Control browsers via the ThinkBrowse CLI (the thinkbrowse / thinkrun command) — navigate pages, interact with elements, extract content, take screenshots. Use ONLY when the user explicitly names the thinkbrowse or thinkrun CLI, or asks to drive the browser from shell scripts / terminal commands. For general browse…

dundas/thinkrun · 98 tokens

thinkbrowse-mcp

Control browsers via ThinkBrowse MCP tools — navigate pages, interact with elements, extract content, take screenshots. Use ONLY when the user explicitly references the thinkbrowse/thinkrun MCP server or its MCP tools. For general browse, scrape, or automation asks that don't name MCP, prefer the web-browse skill. Do…

dundas/thinkrun · 81 tokens

web-browse

Browse the web programmatically with ThinkRun — drive a real or cloud browser to navigate, interact, extract, and screenshot, from the CLI or any MCP client. Use when: visit or open a URL, check a webpage, interact with a browser, verify something works live, take screenshots of a page, scrape or extract content…

dundas/thinkrun · 96 tokens