Agent Native

webapp-testing

This skill enables agents to test local web applications using Playwright by writing Python automation scripts.

by SnykOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (snyk)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
License
Apache-2.0 (permissive)
Pin
2d3ca36pinned Oct 9, 2026
Context cost
about 890 tokenswhen the skill loads
GitHub stars
3,126on snyk/agent-scan
Scripts
4 scripts

What it does

“Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill enables agents to test local web applications using Playwright by writing Python automation scripts. It provides helper scripts to manage server lifecycles and guidance on inspecting rendered pages, discovering UI selectors, and executing browser interactions for frontend verification and debugging.

When to use it

  • Testing local web applications with JavaScript or dynamic content
  • Verifying frontend functionality and UI behavior before deployment
  • Debugging browser interactions and capturing screenshots for inspection
  • Automating workflows across multiple coordinated local servers

When not to

  • Testing production web applications or remote websites
  • Scenarios where the server lifecycle is already fully managed externally

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add snyk/agent-scan --skill webapp-testing

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install snyk/agent-scan webapp-testing@2d3ca361e33452dcfb8e74f7b7db6db0ee08d59e

Installs the commit we checked (2d3ca36).

Copy by hand

Download the folder at 2d3ca36 and put it in .claude/skills/webapp-testing for Claude Code and in .agents/skills/webapp-testing for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 2d3ca36

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "webapp-testing" by Snyk.

Source, pinned to commit 2d3ca361e33452dcfb8e74f7b7db6db0ee08d59e:
https://github.com/snyk/agent-scan/tree/2d3ca361e33452dcfb8e74f7b7db6db0ee08d59e/tests/skills/webapp-testing

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/webapp-testing/ for Claude Code and .agents/skills/webapp-testing/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/snyk/webapp-testing

SKILL.md at the pin

---
name: webapp-testing
description: Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
license: Complete terms in LICENSE.txt
---

# 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 the source until you try running the script first and find that a customized solution is abslutely necessary. These scripts can be very large and thus pollute your context window. They exist to be called directly as black-box scripts rather than ingested into your context window.

## 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 the 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

To start a server, run `--help` first, then use the helper:

**Single server:**
```bash
python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py
```

**Multiple servers (e.g., backend + frontend):**
```bash
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
```

To create an automation script, include only Playwright logic (servers are managed automatically):
```python
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True) # Always launch chromium in headless mode
    page = browser.new_page()
    page.goto('http://localhost:5173') # Server already running and ready
    page.wait_for_load_state('networkidle') # CRITICAL: Wait for JS to execute
    # ... your automation logic
    browser.close()
```

## Reconnaissance-Then-Action Pattern

1. **Inspect rendered DOM**:
   ```python
   page.screenshot(path='/tmp/inspect.png', full_page=True)
   content = page.content()
   page.locator('button').all()
   ```

2. **Identify selectors** from inspection results

3. **Execute actions** using discovered selectors

## Common Pitfall

 **Don't** inspect the DOM before waiting for `networkidle` on dynamic apps
 **Do** wait for `page.wait_for_load_state('networkidle')` before inspection

## Best Practices

- **Use bundled scripts as black boxes** - To accomplish a task, consider whether one of the scripts available in `scripts/` can help. These scripts handle common, complex workflows reliably without cluttering the context window. Use `--help` to see usage, then invoke directly.
- Use `sync_playwright()` for synchronous scripts
- Always close the browser when done
- Use descriptive selectors: `text=`, `role=`, CSS selectors, or IDs
- Add appropriate waits: `page.wait_for_selector()` or `page.wait_for_timeout()`

## Reference Files

- **examples/** - Examples showing common patterns:
  - `element_discovery.py` - Discovering buttons, links, and inputs on a page
  - `static_html_automation.py` - Using file:// URLs for local HTML
  - `console_logging.py` - Capturing console logs during automation

From snyk/agent-scan at 2d3ca36, shown as plain text under its license: Apache-2.0 (permissive). The license text is in tests/skills/webapp-testing/LICENSE.txt.

View SKILL.md on GitHub at 2d3ca36

Files

6 files, 22 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 2d3ca36
All 34 skills from Snyk

More from Snyk

  • algorithmic-art

    This skill generates algorithmic art using p5.js by first creating a computational philosophy describing the generative aesthetic, then implementing it as an…

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 4.8K tokens · pinned 6 days ago

  • brand-guidelines

    This skill applies Anthropic's official brand identity to artifacts by setting specific colors, typography, and design standards.

    Claude Code, Codex, Cursor +4 · about 480 tokens · pinned 6 days ago

  • canary-project-skill

    This is a test fixture skill used by the canary testing system to verify that the agent-scan inspect command properly detects project-scoped skills located in…

    Claude Code, Codex, Cursor +4 · about 45 tokens · pinned 6 days ago

  • canvas-design

    This skill helps agents create visual art and design work as PNG or PDF files by first developing a design philosophy or aesthetic movement, then expressing…

    Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago

  • doc-coauthoring

    This skill guides users through a structured three-stage workflow for co-authoring documentation, proposals, specs, and similar structured content.

    Claude Code, Codex, Cursor +4 · about 3.8K tokens · pinned 6 days ago

  • docx

    This skill enables the agent to create, edit, and analyze Word documents (.docx files) with support for tracked changes, comments, and formatting preservation.

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 2.4K tokens · pinned 6 days ago

All Testing and QA skills
  • triaging-visual-review-runs

    Inspects PostHog Visual Review screenshot regression runs that gate pull requests, helping engineers triage diff results, identify flaky stories, and decide…

    by PostHogOfficial publisher

    Claude Code, Codex, Cursor +4 · about 8.9K tokens · pinned 6 days ago

  • browser-probe

    This skill probes a URL with escalating headless browser configurations to detect CDN bot protection systems like Akamai and Cloudflare, then generates a…

    by Adobe, Inc.Official publisher

    Contains scripts

    Claude Code · about 1K tokens · pinned 6 days ago

  • browser-navigation

    This skill enables agents to automate browser interactions including navigation, form filling, element clicking, screenshots, and data extraction from web…

    by FactoryOfficial publisher

    Claude Code, Codex, Cursor +3 · about 2.5K tokens · pinned 6 days ago

  • triaging-visual-review-runs

    Inspects PostHog Visual Review runs that gate PR merges with screenshot regression checks.

    by PostHogOfficial publisher

    Claude Code, Codex, Cursor +4 · about 8.9K tokens · pinned 6 days ago

  • clerk-testing

    This skill enables end-to-end testing of Clerk authentication flows using Playwright or Cypress test frameworks.

    by ClerkOfficial publisher

    Claude Code, Codex, Cursor +4 · about 480 tokens · pinned 6 days ago

  • e2e-testing

    This skill sets up end-to-end testing for Falcon Foundry applications using Playwright and the @crowdstrike/foundry-playwright library.

    by CrowdStrikeOfficial publisher

    Claude Code, Codex, Cursor +3 · about 5.1K tokens · pinned 6 days ago

Open roles at Snyk

1 open role on the jobs board

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use