Webapp Testing

TopTinker Aug 13, 2026 New v1.0.0 15,551 installs Sec S+ Verified source
Claude Code Cursor
Free
Open verification
AI OverviewGenerated from SKILL.md
Core usage
This skill is a Playwright-based toolkit for interacting with and testing local web applications, covering frontend verification, UI debugging, screenshots, and browser logs. Use it by choosing the decision-tree path: for static HTML, read the file directly to identify selectors; for dynamic apps, use scripts/with_server.py to manage servers and write a Python Playwright script that waits for networkidle before inspecting or acting. Always run helper scripts with --help first and treat bundled scripts as black-box tools rather than reading their source.
Key advantages
Bundled helper scripts handle complex workflows like server lifecycle management, including multiple servers, without cluttering the context window. The reconnaissance-then-action pattern and explicit use of networkidle reduce flaky automation on dynamic pages. It supports direct Playwright scripting, static HTML file URLs, and captures console logs for debugging.
Limitations
Only local web applications are covered, not remote or production sites. Automation is expected to use Playwright's synchronous Python API with Chromium in headless mode, limiting other browser and async options. The helper scripts can be very large, so reading their source is discouraged and can pollute the context window; you must rely on --help and black-box usage.
Target audience
This is for developers and QA engineers testing local web applications who need to verify frontend behavior, debug UI issues, capture screenshots, or inspect browser logs. It suits those comfortable writing or adapting Python Playwright scripts and following a decision tree for static versus dynamic content.
Risks & notes
Inspecting the DOM before waiting for networkidle on dynamic apps can produce incorrect or incomplete selectors, leading to failed automation. Reading large bundled scripts unnecessarily wastes context and should be avoided; always run --help first. Failing to close the browser or starting servers incorrectly can leave processes running, so use the provided server management helper and close browser resources.
DescriptionWritten by the seller

# 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

Use caseInput → Output
Input
` User task → Is it static HTML? ├─ Yes → Read HTML file directly to identify selectors │ ├─ Success → Write Playwright script using selectors │ └─ Fa
Output
Verified guidance, commands and best practices for Webapp Testing, ready to paste into your agent
How it worksImport to your platform and run
Item details
Use case
AI Skills
Capability
Coding
Agents
Claude Code, Cursor
Version
1.0.0
First seen
Aug 13, 2026
Installs
15,551
License
Non-exclusive
Last update
Aug 13, 2026
InstallCompatible with agent skill ecosystem
npx skills add anthropics/skills --skill webapp-testing
Source: anthropics/skills
What you get
SKILL.md skill definitionCommand referenceInstallation instructionsWebapp Testing reference
Verified sourceOriginal project page — inspect before install
Open the original source project
Check the upstream repository, license and changelog before install
Open source
Security ScanS+Score 100/100 · 1 findings · 2026-08-15 21:36:19🤖 AI 已复核
Static analysis100
Dynamic behavior100
Dependencies100
Network100
Privacy100
Threat intel100
Findings (1)
LowSSRF risk(doc reference)1 处
Requests internal addresses (incl. cloud metadata 169.254.169.254) — SSRF risk.
🤖 The matched http://localhost appears to be an example or documentation reference, not actual code performing a server-side request.
L59 · http://localhost
Security scan generated by TopTinker automated engine from SKILL.md static analysis, for pre-install reference only. Third-party skills carry their own runtime risk.
WeChat
Qizhuwang Source Code Trading Platform
2021-12-28开店时间
284商品数
认证
Guarantees
Escrow paymentOn
Platform holds funds until delivery is confirmed
Install verified
Free download - install & run before you pay
Source transparency
Original GitHub repo linked & verified
No refunds after download
Digital product - disputes arbitrated on evidence only
Enhanced protection
Trusted seller - priority arbitration within 48h, backed by platform bond
Upgrade to ProRecommended
Full-Stack Developer Skill Pack
Complete skill bundle · Pack
View Pack
Free

Report this listing

This content is locked. Buy it once and use it forever - instant delivery after purchase.

one-time
Unlock now
Escrow payment · 7-day refund support