skills / anthropics / skills / webapp-testing

Webapp Testing

A verified OpenClaw skill for browser-based web app test workflows with explicit guardrails and reproducible checks.

Source description: Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing br...

npx skills add https://github.com/anthropics/skills --skill webapp-testing
risk: mediuminstall: Manualverified: 2026-02-12

On this page

Our added value (verification layer)

This page is not only a source mirror. We add reproducibility, risk controls, and operations guidance on top of the original skill definition.

  • Execution/Security/Maintainability scoring with explicit criteria
  • Compatibility matrix across runtime environments
  • Verification log with check commands and observed outcomes
  • Common failure fixes and rollback triggers for production safety

Overall score

78/100

Execution

82

Security

78

Maintainability

75

Quick install (universal)

Primary command for most environments:

npx skills add https://github.com/anthropics/skills --skill webapp-testing

Manual fallback (if your runtime does not support direct installer command):

  1. git clone https://github.com/anthropics/skills ./skills
  2. cp -R ./skills/webapp-testing ~/.claude/skills/webapp-testing
  3. Restart your current agent/runtime to reload installed skills.
  • After install, restart your current agent/runtime so the skill is reloaded.
  • Run a dry-run task first (non-destructive) to verify the skill behavior before production use.

SKILL.md (rendered source content)

Readable source reference for this skill. Added verification notes are shown in the sections below.

Web Application Testing

To test local web applications, write native Python Playwright scripts.

Helper Scripts Available:

  • scripts/with_server.py - Manages server lifecycle (supports multiple servers)

Always run scripts with --help first to see usage. Do not read helper script source unless customization is absolutely required.

Decision Tree: Choosing Your Approach

User task → Is it static HTML?
    ├─ Yes → Read HTML file directly to identify selectors
    │         ├─ Success → Write Playwright script using selectors
    │         └─ Fails/Incomplete → Treat as dynamic (below)
    │
    └─ No (dynamic webapp) → Is the server already running?
        ├─ No → Run: python scripts/with_server.py --help
        │        Then use helper + write simplified Playwright script
        │
        └─ Yes → Reconnaissance-then-action:
            1. Navigate and wait for networkidle
            2. Take screenshot or inspect DOM
            3. Identify selectors from rendered state
            4. Execute actions with discovered selectors

Example: Using with_server.py

Run help first, then execute:

Single server

python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py

Multiple servers

python scripts/with_server.py \
  --server "cd backend && python server.py" --port 3000 \
  --server "cd frontend && npm run dev" --port 5173 \
  -- python your_automation.py

Playwright Pattern

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True)
    page = browser.new_page()
    page.goto('http://localhost:5173')
    page.wait_for_load_state('networkidle')
    # ... automation logic
    browser.close()

Reconnaissance-Then-Action

  1. Inspect rendered DOM
  2. Identify selectors from observed page state
  3. Execute actions with discovered selectors

Common Pitfall

  • Do not inspect dynamic app DOM before networkidle
  • Do wait for page.wait_for_load_state('networkidle') first

Best Practices

  • Use bundled scripts as black boxes
  • Use sync_playwright() for synchronous scripts
  • Always close browser sessions
  • Prefer descriptive selectors (text=, role=, CSS, IDs)
  • Add explicit waits where needed

Reference Files

  • examples/element_discovery.py
  • examples/static_html_automation.py
  • examples/console_logging.py

Required permissions

web, file

Compatibility matrix

EnvironmentStatusNotes
Local macOS workspacepassDry-run and read-only browser checks stable.
Server runtime (restricted policy)partialRequires explicit browser capability allowance.
No-browser runtimefailSkill scope depends on browser actions.

Verification log

Repository reachable

git ls-remote https://github.com/anthropics/skills

Pass

result: pass

Skill structure present

test -f ~/.claude/skills/webapp-testing/SKILL.md

Pass

result: pass

Dry-run workflow

run prompt: "audit login page UI smoke checks"

Pass

result: pass (non-destructive path)

Security notes

  • Review requested browser actions before enabling in production.
  • Run with least-privilege permissions and approval for destructive actions.
  • Do not inject credentials into skill files; use secure environment configuration.

Common failures and fixes

permission denied: browser tool blocked

Enable browser capability for this workflow only and re-run dry test.

skill discovered but no actions executed

Re-check SKILL.md path and restart runtime to refresh registry.

snapshot artifact write failed

Allow write access only to designated artifact directory.

Quick FAQ

How do I install this skill quickly?

Run npx skills add https://github.com/anthropics/skills --skill webapp-testing, then restart your runtime to reload skills.

What should I check before production rollout?

Confirm permissions, run a non-destructive dry run, and review rollback triggers.

What if install succeeds but actions do not run?

Verify SKILL.md location, restart runtime, and check environment/dependency readiness.

Recent changes

  • 2026-02-13: Added FAQ schema and in-page navigation anchors.
  • 2026-02-13: Improved mobile tap target sizing and code readability.
  • 2026-02-12: Verified install and dry-run flow in local runtime.

Rollback triggers

  • Unexpected destructive browser action appears in logs.
  • Permission scope must be broadened beyond approved boundaries.
  • Two consecutive dry-runs fail after patch.

Known issues

No browser tool in runtime

Enable browser capability or skip this skill.

Permission denied for local file snapshots

Allow read access to designated test artifact directory only.

Site references