Playwright Browser Automation

Playwright Browser Automation

General-purpose browser automation using Playwright for testing, scraping, and workflow automation.

Claude / Claude Code
GitHub Copilot
Cursor
VS Code
OpenAI Codex
Gemini CLI
TestingDeveloper

What it does

Claude generates Playwright tests with selectors that are brittle (using CSS classes that change on every build), `waitForTimeout` calls instead of proper wait conditions, missing retry logic, and test structure that passes locally but flakes in CI due to timing assumptions. This skill loads correct Playwright patterns: semantic selectors using `getByRole` and `getByTestId`, proper async wait conditions, Page Object Model structure for maintainable tests, and network interception for testing without hitting real external services. Made by lackeyjb.

Use case

Browser automation and end-to-end testing with Playwright — both for application testing and for general web automation (scraping, form filling, workflow automation). Use it whenever you need tests that pass reliably in CI, not just locally.

The Prompt

Copy and use immediately
"Write an e2e test for the checkout flow using correct Playwright patterns."
"This test flakes in CI — diagnose the timing issue and fix the wait conditions."
"Build a Page Object for the admin panel so tests don't break when the UI changes."
"Write a test that mocks the payment API so we don't hit real Stripe in CI."
"Automate this web form — fill it from a CSV and submit one row per session."

How to use

  1. 1

    Describe the flow to test or automate. Claude uses semantic selectors that survive UI changes.

  2. 2

    For flaky tests: paste the test and the failure output. Claude identifies the timing assumption and fixes it.

  3. 3

    For CI: Claude adds the correct retry configuration and environment-aware setup.

Input / Output

Input

A flow description, existing flaky test code, or an automation task.

Output

Playwright code with semantic selectors, correct async wait conditions, proper test structure, and CI-compatible configuration. Tests that pass reliably — not just on your machine.

Added 15 Mar 2026Submitted by lackeyjb👁 45📋 0

Details

Platforms
Claude / Claude CodeGitHub CopilotCursorVS CodeOpenAI CodexGemini CLI
Category
Testing
License
apache-2.0
Author
lackeyjb

Stats

📋 Copies0
👁 Views45
👍 Upvotes0

Install with skills.sh

npx skillsadd lackeyjb/skills/playwright-automation

Requires skills.sh CLI

Community Notes

Sign in with GitHub to leave a note.

No notes yet. Be the first to contribute.