🎯

webapp-testing

🎯Skill

from forever-efficient/pitfal-solutions-website

VibeIndex|
What it does

Automates web application testing using Playwright, enabling frontend verification, UI debugging, and browser interaction with Python scripts.

πŸ“¦

Part of

forever-efficient/pitfal-solutions-website(27 items)

webapp-testing

Installation

pnpmRun with pnpm
pnpm install
pnpmRun with pnpm
pnpm dev
πŸ“– Extracted from docs: forever-efficient/pitfal-solutions-website
2Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

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.

Overview

# Web Application Testing

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

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 β†’ Start the server first, then write 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: Basic Playwright Script

```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')

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()

```

  1. Identify selectors from inspection results
  1. 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 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()