playwright-testing

playwright-testing is a skill for Claude Code, Codex from navikt/copilot. It costs 33 tokens per session (2,005 once invoked), scanned A, original, MIT.

A testing skill for Playwright, a tool that opens a web app in real browsers and checks complete user journeys. It covers reusable page descriptions, sign-in test setup, accessibility checks, and automated test runs.

In plain words
What is it for?
Use it to create and run browser-based end-to-end tests, including tests for Azure AD or mock sign-in, responsive layouts, forms, and accessibility. It also helps configure test runs in GitHub Actions, a service for running checks automatically.
Why use it?
It helps catch problems in navigation, forms, mobile layouts, and accessibility before users do. It also avoids repeating setup for login and common pages in every test.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/navikt/copilot/playwright-testing.svg)](https://agentmods.dev/skills/navikt/copilot/playwright-testing)
Your own site
<a href="https://agentmods.dev/skills/navikt/copilot/playwright-testing"><img src="https://agentmods.dev/badge/skills/navikt/copilot/playwright-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,005 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.00033 $0.02005
Opus 5 $0.00016 $0.01002
Sonnet 5 $0.00007 $0.00401
Haiku 4.5 $0.00003 $0.00200

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

Security

Grade A, and why

playwright-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.

skills/playwright-testing/SKILL.md · 282 lines

How it starts

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

Playwright E2E Testing Skill

Generate Playwright tests for Nav web applications. Covers page object pattern, authentication fixtures, accessibility testing, and CI configuration.

Getting Started

  1. Install Playwright and configure playwright.config.ts
  2. Create page objects for your app's pages
  3. Set up auth fixtures for Azure AD / MockOAuth2Server
  4. Write tests: navigation, forms, responsive, accessibility
  5. Add CI workflow in GitHub Actions

1. Project Setup

# Install Playwright
pnpm add -D @playwright/test
pnpm exec playwright install --with-deps chromium

# Create configuration
pnpm exec playwright init

playwright.config.ts

import { defineConfig, devices } from "@playwright/test";

export default defineConfig({
  testDir: "./e2e",
  fullyParallel: true,
  forbidOnly: !!process.env.CI,
  retries: process.env.CI ? 2 : 0,
  workers: process.env.CI ? 1 : undefined,
  reporter: [["html", { open: "never" }]],
  use: {
    baseURL: process.env.BASE_URL ?? "http://localhost:3000",
    trace: "on-first-retry",
    screenshot: "only-on-failure",
  },
  projects: [
    { name: "chromium", use: { ...devices["Desktop Chrome"] } },
    { name: "mobile", use: { ...devices["Pixel 7"] } },
  ],
  webServer: {
    command: "pnpm dev",
    url: "http://localhost:3000",
    reuseExistingServer: !process.env.CI,
  },
});

2. Page Object Pattern

// e2e/pages/oversikt.page.ts
import { type Locator, type Page, expect } from "@playwright/test";

export class OversiktPage {
  readonly heading: Locator;
  readonly searchField: Locator;
  readonly table: Locator;

  constructor(private readonly page: Page) {
    this.heading = page.getByRole("heading", { name: /oversikt/i });
    this.searchField = page.getByRole("searchbox", { name: /søk/i });
    this.table = page.getByRole("table");
  }

  async goto() {
    await this.page.goto("/oversikt");
    await expect(this.heading).toBeVisible();
  }

  async search(query: string) {
    await this.searchField.fill(query);
    await this.searchField.press("Enter");
  }

  async expectRowCount(count: number) {
    const rows = this.table.getByRole("row");
    // Minus header row
    await expect(rows).toHaveCount(count + 1);
  }
}

Read the full file on GitHub · 282 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 282 lines · 33 tokens per session scan A 2f5bb75962fa

Subscribe to this mod's changes

playwright-testing is a skill published in the GitHub repository navikt/copilot (54 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 2,005 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

playwright

Navigate websites and query page content using Playwright CLI. Use this skill when the user asks to open a URL, extract data from a page, or check UI state.

CodelyTV/agentic_programming-course · 37 tokens

dingtalk_channel_connect

Use a headed browser to automatically complete DingTalk channel integration for QwenPaw. Applicable when the user mentions DingTalk, developer console, Client ID, Client Secret, bot, Stream mode, binding or configuring a channel. Supports pausing when a login page is detected and resuming after the user logs in.

agentscope-ai/QwenPaw · 69 tokens

browser_cdp

当用户明确希望连接到已运行的 Chrome 浏览器、扫描本地 CDP 端口、显式指定 cdpport,或让多个 agent / 工具共享同一个浏览器时,使用本 skill。browser 默认不开放调试端口;仅当用户明确希望其他本地工具附加时才显式传入 cdpport。.

agentscope-ai/QwenPaw · 85 tokens

browser_visible

当用户需要控制 browser 的浏览器启动方式时,使用本 skill。browser 默认由 Playwright 直接管理、不开放调试端口(需让其他本地工具附加时显式传 cdpport);headed 控制是否显示窗口,privatemode 保留用于兼容、不再改变默认行为,browserargs 传入额外的 Chromium 启动参数,executablepath 指定自定义浏览器可执行文件路径。.

agentscope-ai/QwenPaw · 108 tokens

browser_visible

Use this skill when the user needs to control the browser launch mode for browser. By default browser is managed by Playwright and opens no debugging port (pass an explicit cdpport to let another local tool attach); headed controls whether the window is visible, and privatemode is kept for backward compatibility and…

agentscope-ai/QwenPaw · 75 tokens

browser

Drive a live browser with async Python against QwenPaw's builtin Browser SDK. The full reference is below; re-load this browser skill after context compaction.

agentscope-ai/QwenPaw · 35 tokens