AI Agent Hub
Back to skills
💻

Browser Automation

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @org-02qudk26/browser-automation-cn into your AI assistant.

About this skill

Problem Solved

Browser automation failures often come not from business logic, but from fragile selectors, uncontrolled waits, and run-time detection. CSS and XPath can break after minor markup changes; manual waitForTimeout makes tests inconsistent; shared browser contexts can leak state between cases. This skill organizes these recurring issues into practical engineering guidance.

How It Works

It centers on browser automation with Playwright and Puppeteer, emphasizing how the browser interprets the page before writing stable scripts. Key practices include:

  • User-facing locators: prefer role, visible text, and labels to reduce dependence on brittle DOM structure.
  • Automatic waiting: remove waitForTimeout and rely on Playwright's explicit and implicit waits.
  • Test isolation: use separate browser contexts or clean state per test to avoid shared cookie, localStorage, and dialogs.
  • Diagnosable failures: enable trace, keep the viewport consistent, and add request pacing to reduce flaky results.

Boundaries

It fits e2e-testing, web-scraping, ui-automation, and selenium-alternatives workflows. It does not replace meaningful assertions or guarantee evasion of all anti-bot systems; for heavily protected sites, request cadence, privacy rules, and site policies still matter.

Use Cases

  • Frontend engineer writes Playwright E2E for login, needing stable locators and waits.
  • QA lead migrates Selenium cases, avoiding shared context, cookies, and dialog pollution.
  • Automation engineer scrapes dynamic list pages, using pacing, viewport, and traces.
  • Tool developer builds UI agent actions, preferring user-facing locators over CSS.

Best For

  • Frontend engineer: wants to replace brittle CSS selectors with stable Playwright locators.
  • QA lead: wants to migrate Selenium and reduce flaky tests from shared contexts.
  • Automation engineer: needs to scrape dynamic pages with pacing, viewport, and traces.
  • Tool developer: wants UI automation actions based on user-facing locators.