browser-automation

Automate browser testing, scraping, and agent interactions with Playwright and Puppeteer.

1|Updated May 10, 2026
One-click install
npx skills add https://github.com/Tgoldi/claude-skills --skill browser-automation-tgoldi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: browser-automation
Source: https://github.com/Tgoldi/claude-skills/tree/main/browser-automation
Command: npx skills add https://github.com/Tgoldi/claude-skills --skill browser-automation-tgoldi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Browser automation scripts often fail due to bad selectors, missing waits, and bot detection systems, producing flaky tests and fragile scrapers. This Skill provides proven patterns for building stable automation with Playwright and Puppeteer. ## Core Features & Use Cases - Selector and Locator Guidance: Teaches user-facing locator strategies instead of brittle CSS/XPath selectors. - Auto-Wait Patterns: Explains how to rely on Playwright's built-in waiting instead of arbitrary timeouts. - Anti-Detection and Scraping: Covers stealth plugins, request delays, and popup handling for long-running scrapers. - Use Case: A QA engineer needs to stabilize a flaky end-to-end test suite; the Skill guides them to isolate tests, use user-facing locators, and enable traces for failures. ## Quick Start Use the browser-automation skill to help me write a Playwright end-to-end test that logs in and verifies the dashboard loads.

Frequently Asked Questions about browser-automation

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

FAQPage Schema
How do I write reliable Playwright tests that don't flake?

Reliable Playwright tests use user-facing locators like getByRole instead of CSS or XPath selectors, rely on Playwright's auto-waiting instead of manual timeouts, and run each test in full isolation with fresh state.

Playwright vs Puppeteer: which should I use for browser automation?

Playwright is the recommended choice for most projects due to its auto-waiting, multi-browser support, and modern API. Choose Puppeteer only if you need its stealth plugin ecosystem or are Chrome-only.

How do I avoid bot detection when scraping with headless browsers?

Avoid detection by using stealth plugins, adding delays between requests, and setting a consistent viewport. Detection systems are one of the three main causes of automation failure alongside bad selectors and missing waits.

Why should I avoid waitForTimeout in Playwright?

Arbitrary timeouts make tests slow and still flaky because fixed delays cannot match variable page load conditions. Playwright's auto-wait mechanism waits for actual element readiness, so all waitForTimeout calls should be removed.

How do I handle popups in Playwright tests?

Wait for the popup event before triggering the action that opens it, using page.waitForEvent('popup') or context.waitForEvent('page'). Setting up the listener first prevents race conditions where the popup is missed.