Browser Automation
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
waitForTimeoutand 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 theviewportconsistent, 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.
Related Skills
Track multiple GitHub projects, check releases and changelogs, and generate structured update summaries with impact analysis.
Upload local files to Qiniu Object Storage with server-side auto-delete days and public or private permanent URLs, ideal for temporary files and replacing Base64 storage.
Creates themed learning sites by generating flashcards, lessons, quizzes, index, and progress pages into a deployable website.
End-to-end mathematical optimization modeling with Gurobi and Python, covering data validation, code generation, solving, result analysis, and iterative revision.