webapp-testing

Automate testing of local web applications using Python Playwright scripts.

Updated Oct 7, 2022
One-click install
npx skills add https://github.com/tamagusko/linux-cfg --skill webapp-testing-tamagusko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webapp-testing
Source: https://github.com/tamagusko/linux-cfg/tree/main/dotfiles/claude/skills/webapp-testing
Command: npx skills add https://github.com/tamagusko/linux-cfg --skill webapp-testing-tamagusko

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually verifying frontend behavior of local web applications is slow and error-prone, especially when servers must be started, pages must finish rendering, and selectors must be discovered before any interaction can happen. ## Core Features & Use Cases - Server Lifecycle Management: The scripts/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. - Reconnaissance-Then-Action Workflow: Navigate to a page, wait for networkidle, inspect the rendered DOM or take screenshots, then act on discovered selectors. - Example Patterns: Ready-made examples cover element discovery, static HTML automation via file:// URLs, and console log capture. - Use Case: You are developing a React frontend with a Python backend and want to verify a login flow. Use the helper to launch both servers, then run a Playwright script that fills the form, submits it, and screenshots the result. ## Quick Start Use the webapp-testing skill to start my dev server and write a Playwright script that verifies the login page renders correctly.

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 sync_playwright, launch Chromium in headless mode, navigate to your localhost URL, and wait for the networkidle load state before interacting. Use the with_server.py helper to start your dev server automatically before the script runs.

How do I run Playwright tests that need multiple servers running?

Pass multiple --server and --port pairs to with_server.py, for example one for a backend on port 3000 and one for a frontend on port 5173. The script waits for each port to accept connections before running your automation command.

Why does Playwright find no elements on my dynamic web page?

Dynamic apps render content via JavaScript after the initial page load, so inspecting the DOM too early returns nothing. Call page.wait_for_load_state('networkidle') before querying selectors or taking screenshots.

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 capture screenshots exactly as with a served page.

How do I capture browser console logs during Playwright automation?

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