Chuyển đến nội dung
Skillpedia
Kiểm thử33k · #9087

browser-automation

Skill này làm gì

Skill này hướng dẫn agent AI viết tự động hóa trình duyệt ít bị hỏng hơn, sử dụng Playwright và Puppeteer. Skill dành cho lập trình viên và đội QA kiểm thử hoặc tự động hóa website.

Khi nào nên dùng

  • ✓Khi bạn muốn viết kiểm thử đầu cuối cho một website mà không dễ bị lỗi.
  • ✓Khi bạn cần thu thập dữ liệu từ trang web hoặc điều khiển trình duyệt như một phần của tác vụ agent.
  • ✓Khi kiểm thử trình duyệt của bạn hay chập chờn và bạn muốn cải thiện bộ chọn và chiến lược chờ.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/utilities/browser-automation/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/utilities/browser-automation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể viết một kiểm thử Playwright đáng tin cậy cho trang thanh toán của chúng tôi mà không phụ thuộc vào thời gian chờ cố định không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent dùng bộ định vị hướng đến người dùng và cơ chế chờ tự động của Playwright, đồng thời giữ mỗi kiểm thử độc lập, nhờ đó kết quả đáng tin cậy hơn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Browser Automation

You are a browser automation expert who has debugged thousands of flaky tests and built scrapers that run for years without breaking. You've seen the evolution from Selenium to Puppeteer to Playwright and understand exactly when each tool shines.

Your core insight: Most automation failures come from three sources - bad selectors, missing waits, and detection systems. You teach people to think like the browser, use the right selectors, and let Playwright's auto-wait do its job.

For scraping, yo

Capabilities

  • browser-automation
  • playwright
  • puppeteer
  • headless-browsers
  • web-scraping
  • browser-testing
  • e2e-testing
  • ui-automation
  • selenium-alternatives

Patterns

Test Isolation Pattern

Each test runs in complete isolation with fresh state

User-Facing Locator Pattern

Select elements the way users see them

Auto-Wait Pattern

Let Playwright wait automatically, never add manual waits

Anti-Patterns

❌ Arbitrary Timeouts

❌ CSS/XPath First

❌ Single Browser Context for Everything

⚠️ Sharp Edges

Issue Severity Solution
Issue critical # REMOVE all waitForTimeout calls
Issue high # Use user-facing locators instead:
Issue high # Use stealth plugins:
Issue high # Each test must be fully isolated:
Issue medium # Enable traces for failures:
Issue medium # Set consistent viewport:
Issue high # Add delays between requests:
Issue medium # Wait for popup BEFORE triggering it:

Related Skills

Works well with: agent-tool-builder, workflow-automation, computer-use-agents, test-architect

Câu hỏi thường gặp

Vì sao kiểm thử trình duyệt hay chập chờn?

Skill cho biết phần lớn lỗi đến từ bộ chọn kém, thiếu thời gian chờ và các hệ thống phát hiện tự động hóa.

Có bao gồm Puppeteer không?

Có. Skill khuyến nghị Playwright và cũng bao gồm Puppeteer.

Skill chỉ dành cho kiểm thử à?

Không. Skill cũng bao gồm thu thập dữ liệu và điều khiển trình duyệt bằng agent.

Chi tiết

Mô tả gốc của tác giả

Browser automation powers web testing, scraping, and AI agent interactions. The difference between a flaky script and a reliable system comes down to understanding selectors, waiting strategies, and anti-detection patterns. This skill covers Playwright (recommended) and Puppeteer, with patterns for testing, scraping, and agentic browser control. Key insight: Playwright won the framework war. Unless you need Puppeteer's stealth ecosystem or are Chrome-only, Playwright is the better choice in 202

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#9087
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự