webapp-testing

webapp-testing is a skill for Claude Code, Codex from JNZader/repoforge. It costs 49 tokens per session (724 once invoked), scanned A, original, MIT.

Browser-based interface testing guidance using Playwright, a tool for controlling web browsers in automated tests. It covers accessible selectors, page objects, visual checks, network interception, and MCP integration.

In plain words
What is it for?
Use it for end-to-end browser tests, interface changes, login flows, visual regression checks, or Playwright setup.
Why use it?
It helps tests find page elements reliably and catch user-interface or visual regressions.

Skill for Claude CodeCodex

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/jnzader/repoforge/webapp-testing
Any agent
npx skills add JNZader/repoforge --skill webapp-testing
Clone the repo
git clone --depth 1 https://github.com/JNZader/repoforge

Made for: Claude Code, Codex.

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 webapp-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnzader/repoforge/webapp-testing.svg)](https://agentmods.dev/skills/jnzader/repoforge/webapp-testing)
Your own site
<a href="https://agentmods.dev/skills/jnzader/repoforge/webapp-testing"><img src="https://agentmods.dev/badge/skills/jnzader/repoforge/webapp-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 724 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.00049 $0.00724
Opus 5 $0.00024 $0.00362
Sonnet 5 $0.00010 $0.00145
Haiku 4.5 $0.00005 $0.00072

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

Security

Grade A, and why

webapp-testing 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.

own/skills/webapp-testing/SKILL.md · 100 lines

How it starts

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

Purpose

Patterns for browser-based UI verification using Playwright. Reliable, maintainable, fast E2E tests.


Selector Priority

Priority Selector Example Why
1 Role getByRole('button', { name: 'Submit' }) Accessible, semantic
2 Label getByLabel('Email') Accessible, user-facing
3 Test ID getByTestId('submit-btn') Stable, explicit
4 Text getByText('Sign in') Readable but fragile
5 CSS page.locator('.btn-primary') Last resort

NEVER: XPath, auto-generated IDs, DOM structure selectors.


Page Object Model

export class LoginPage {
  constructor(private page: Page) {}
  get emailInput() { return this.page.getByLabel('Email'); }
  get passwordInput() { return this.page.getByLabel('Password'); }
  get submitButton() { return this.page.getByRole('button', { name: 'Sign in' }); }

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

Visual Regression

test('dashboard renders correctly', async ({ page }) => {
  await page.goto('/dashboard');
  await page.waitForLoadState('networkidle');
  await expect(page).toHaveScreenshot('dashboard.png', { maxDiffPixelRatio: 0.01 });
});

Network Interception

test('handles API errors', async ({ page }) => {
  await page.route('**/api/users', route =>
    route.fulfill({ status: 500, body: 'Server Error' })
  );
  await page.goto('/users');
  await expect(page.getByText('Something went wrong')).toBeVisible();
});

Anti-Flakiness

  1. Wait for state, not time — never page.waitForTimeout()
  2. Isolate tests — fresh context per test
  3. Web-first assertions — expect(locator).toBeVisible() auto-retries
  4. Mock external APIs
  5. CI retries: retries: 2 in config

Critical Rules

  1. NEVER use page.waitForTimeout() — wait for specific conditions
  2. ALWAYS use Page Object Model for pages with 3+ interactions
  3. Selectors MUST follow priority: role > label > testid > text > CSS
  4. Visual regression MUST set maxDiffPixelRatio
  5. E2E tests MUST NOT depend on seed data
  6. ALWAYS use --trace on-first-retry in CI

Read the full file on GitHub · 100 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 · 100 lines · 49 tokens per session scan A 2dba5753b866

Subscribe to this mod's changes

webapp-testing is a skill published in the GitHub repository JNZader/repoforge (5 stars, last pushed 10d ago), licensed MIT. It adds 49 tokens to every session and 724 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-31.