webapp-testing

Test local web applications with Python Playwright scripts and managed server lifecycles.

Updated Nov 10, 2013
One-click install
npx skills add https://github.com/bnferguson/dotfiles --skill webapp-testing-bnferguson
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: webapp-testing
Source: https://github.com/bnferguson/dotfiles/tree/main/.agents/skills/webapp-testing
Command: npx skills add https://github.com/bnferguson/dotfiles --skill webapp-testing-bnferguson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) components.

What problem does it solve? Verifying frontend behavior and debugging UI issues in local web applications requires manually starting servers, waiting for them to be ready, and writing browser automation from scratch, which is slow and error-prone. ## Core Features & Use Cases - Server Lifecycle Management: The with_server.py helper starts one or more servers (e.g., backend plus frontend), waits for their ports to be ready, runs your automation, and cleans up afterward. - Playwright Browser Automation: Write native Python Playwright scripts to navigate pages, click elements, fill forms, capture screenshots, and collect console logs. - Reconnaissance-Then-Action Workflow: Inspect the rendered DOM after networkidle, identify selectors, then execute actions against dynamic webapps. - Use Case: Start a Vite dev server and a backend API together, then run a script that logs in, clicks through the dashboard, and saves a full-page screenshot plus console logs for debugging. ## Quick Start Use the webapp-testing skill to start my dev server on port 5173 and verify the login form works by writing a Playwright script.

Frequently Asked Questions about webapp-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a local web application with Playwright in Python?▼

Write a script using playwright.sync_api, launch Chromium in headless mode, navigate to your localhost URL, and wait for the networkidle load state before interacting with elements. Use the with_server.py helper to start your dev server automatically if it is not already running.

How do I run Playwright tests against multiple servers at once?▼

Pass repeated --server and --port flags to with_server.py, one pair per server, followed by your automation command after a double dash. The script starts each server, waits for its port to accept connections, runs your command, then terminates all servers.

Can Playwright automate static HTML files without a server?▼

Yes, Playwright can open local HTML files directly using file:// URLs built from the absolute file path. You can then click elements, fill forms, and take screenshots exactly as you would against a served page.

Why does my Playwright script fail to find elements on a dynamic page?▼

The script likely inspects the DOM before JavaScript finishes rendering. Call page.wait_for_load_state('networkidle') after navigation, then take a screenshot or read page.content() to discover the actual rendered selectors before acting.

How do I capture browser console logs during Playwright automation?▼

Register a handler with page.on('console', handler) before navigating, and append each message's type and text to a list. After the browser closes, write the collected messages to a log file for review.