go-playwright
Tests & QualitéExpert capability for robust, stealthy, and efficient browser automation using Playwright Go.
Documentation
Playwright Go Automation Expert
Overview
This skill provides a comprehensive framework for writing high-performance, production-grade browser automation scripts using github.com/playwright-community/playwright-go. It enforces architectural best practices (contexts over instances), robust error handling, structured logging (Zap), and advanced human-emulation techniques to bypass anti-bot systems.
When to Use This Skill
Safety & Risk
Risk Level: 🔵 Safe
defer to prevent memory leaks.Limitations
go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps).Strategic Implementation Guidelines
1. Architecture: Contexts vs. Browsers
CRITICAL: Never launch a new Browser instance for every task.
Browser once (singleton). Create a new BrowserContext for each distinct session or task.2. Logging & Observability
go.uber.org/zap exclusively.fmt.Println.zap.NewDevelopment() (Console friendly)zap.NewProduction() (JSON structured)logger.Info("clicking button", zap.String("selector", sel))).3. Error Handling & Stability
defer to close Pages, Contexts, and Browsers.playwright.PageClickOptions{Timeout: playwright.Float(5000)}).4. Stealth & Human-Like Behavior
To bypass anti-bot systems (Cloudflare, Akamai), the generated code must imitate human physiology:
Fill(). Use Type() with random delays between keystrokes (50ms–200ms).5. Documentation Usage
Resources
resources/implementation-playbook.md for detailed code examples and implementation patterns.Summary Checklist for Agent
Headless=false, SlowMo=100+.NewContext, apply new Proxy, rotate User-Agent.SafeAction with Zap logging.HumanType, BezierMouse, and Stealth Scripts.Compétences similaires
Explorez d'autres agents de la catégorie Tests & Qualité
backtesting-frameworks
Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strategies, or building backtesting infrastructure.
bats-testing-patterns
Master Bash Automated Testing System (Bats) for comprehensive shell script testing. Use when writing tests for shell scripts, CI/CD pipelines, or requiring test-driven development of shell utilities.
tdd-workflow
Test-Driven Development workflow principles. RED-GREEN-REFACTOR cycle.