playwright-skill

Automates browser testing and web interaction scripts using Playwright with dev-server detection.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/Barbaros911/As-mine --skill playwright-skill-barbaros911
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-skill
Source: https://github.com/Barbaros911/As-mine/tree/main/.claude/skills/playwright-browser-automation
Command: npx skills add https://github.com/Barbaros911/As-mine --skill playwright-skill-barbaros911

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright.

What problem does it solve? Manually verifying websites, login flows, responsive layouts, and links is repetitive and error-prone. This Skill writes and executes focused Playwright scripts so an AI agent can drive a real browser, capture screenshots, and validate web functionality on demand. ## Core Features & Use Cases - Reusable Script Execution: Writes Playwright scripts to a temp directory and runs them through a dedicated executor (run.js) that injects helpers, preserves scripts via PW_SCRIPT_DIR, and handles signals cleanly. - Dev-Server Detection & Helpers: Auto-detects running localhost servers on common ports, launches Chromium/Firefox/WebKit, dismisses cookie banners, and saves timestamped screenshots. - Use Case: Ask the agent to check whether your app's login flow works on mobile and desktop viewports; it detects the local server, runs the flow with test credentials, and returns full-page screenshots for each viewport. ## Quick Start Use the Playwright skill to open my local dev server, sign in with my test credentials, and take desktop and mobile screenshots of the dashboard.

Frequently Asked Questions about playwright-skill

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

FAQPage Schema
How do I automate browser testing with Playwright?▼

Write a Playwright script using locators like getByRole and getByLabel, then execute it with the skill's run.js executor, which injects helpers and the Playwright library. Scripts run in a visible browser by default and can capture screenshots and validate page state.

How to test a localhost website with Playwright?▼

Use the detectDevServers helper to scan common ports (3000, 5173, 8080, and others) for running servers, then point your script at the detected URL. If multiple servers respond, choose one explicitly before running the automation.

Does Playwright support Firefox and WebKit browsers?▼

Yes, Playwright supports Chromium, Firefox, and WebKit. Set the PW_BROWSER environment variable to select the browser, and run the install-all-browsers npm script to download all three browser binaries.

Can I run Playwright in headless mode?▼

Yes, set PW_HEADLESS=true to run without a visible window. Visible mode is the default; headless is recommended only when requested or when the environment has no display available.

Why does my Playwright script hang after execution?▼

Scripts that leave the browser open can hang the process. Always close the browser in a finally block; the inline -e execution mode exits automatically once the snippet settles, but file-based scripts must clean up themselves.