web-testing-playwright

Test and debug websites in a real browser using Playwright automation scripts.

2|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill web-testing-playwright-mbadali25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-testing-playwright
Source: https://github.com/mbadali25/useful-claude-add-ons/tree/main/skills/web-testing-playwright
Command: npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill web-testing-playwright-mbadali25

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Source code tells you what should happen, but only a real browser shows what actually does. This Skill loads live or local web pages in Playwright-driven Chromium, Firefox, or WebKit to reproduce UI bugs, capture console errors and failed network requests, verify login flows, and screenshot layouts at multiple viewport sizes — returning evidence instead of guesses. ## Core Features & Use Cases - Page Auditing: audit_page.py loads any URL, records HTTP status, console errors, uncaught exceptions, failed and slow requests, and screenshots the page at desktop, tablet, and mobile widths, writing a structured JSON report. - Form Inspection & Login: inspect_forms.py enumerates every form field with labels, constraints, and suggested Playwright locators; login.py authenticates using environment-variable credentials and saves a reusable storage-state session file. - Environment Setup & Troubleshooting: check_env.py detects missing Playwright packages and browser binaries, with detailed Windows (winget/Chocolatey) and Linux setup guides plus an error-to-cause troubleshooting reference. - Use Case: A user reports "the login flow is broken on mobile." The Skill logs in with saved credentials, audits the page at 390px width, and returns a screenshot, the failing API response, and the exact console error. ## Quick Start Ask the assistant to check whether your website or a specific page works correctly in a real browser and report any errors with screenshots.

Frequently Asked Questions about web-testing-playwright

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

FAQPage Schema
How do I test a website with Playwright in Python?

Install the Playwright package with pip, run playwright install chromium to download browser binaries, then load pages with the sync API. The bundled audit_page.py script captures status, console errors, failed requests, and multi-viewport screenshots in one command.

How do I automate login and reuse the session in Playwright?

Provide credentials through environment variables, fill the login form, then save the authenticated session with context.storage_state. Later runs pass that file as storage_state to new contexts, skipping repeated logins until the session expires.

Should I use Python Playwright or the Node @playwright/test runner?

Python Playwright is faster for one-off investigations and bug reproduction. The Node @playwright/test runner suits durable test suites that run in CI, since it provides retries, parallelism, HTML reports, and per-test traces.

Why does my Playwright test pass headed but fail headless?

Headless-only failures usually come from timing races that headed mode's slower pace hides, different default viewport sizes, or missing fonts on server images. Treat it as a real finding since CI runs headless, and fix the missing wait rather than adding sleeps.

Why does Playwright fail to launch browsers on Linux?

Linux servers typically lack the shared libraries Chromium needs, producing errors about missing .so files like libnss3. Run sudo playwright install-deps chromium to install the system packages; Alpine/musl is unsupported, so use the official Docker image there.

Can Playwright automate logins protected by MFA or CAPTCHA?

MFA and CAPTCHA cannot be automated away. For MFA, run headed with a pause so a human completes it once, then reuse the saved storage state. For CAPTCHA, ask whether the staging environment has test keys rather than attempting to bypass the control.