playwright-automation

korallis 的头像作者 korallis

17. 使用Playwright在多个浏览器中自动化浏览器测试、网络抓取和用户工作流程测试。用于为Web应用程序编写端到端测试、自动化重复的浏览器任务、从网站抓取数据、在Chrome/Firefox/Safari上测试、为视觉回归测试截图、测试认证流程、程序化填写和提交表单、测试不同视口上的响应式设计或任何需要可靠、跨浏览器测试功能的浏览器自动化时使用。

📖 中文导读:17. 使用Playwright在多个浏览器中自动化浏览器测试、网络抓取和用户工作流程测试。用于为Web应用程序编写端到端测试、自动化重复的浏览器任务、从网站抓取数据、在Chrome/Firefox/Safari上测试、为视觉回归测试截图、测试认证流程、程序化填写和提交表单、测试不同视口上的响应式设计或任何需要可靠、跨浏览器测试功能的浏览器自动化时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: playwright-automation description: Automate browser testing, web scraping, and user workflow testing with Playwright across multiple browsers. Use when writing end-to-end tests for web applications, automating repetitive browser tasks, scraping data from websites, testing across Chrome/Firefox/Safari, taking screenshots for visual regression testing, testing authentication flows, filling and submitting forms programmatically, testing responsive designs across viewports, or any browser automation requiring reliable, cross-browser testing capabilities.

Playwright Automation - Browser Testing

When to use this skill

  • Writing end-to-end tests for web applications
  • Automating repetitive browser tasks and workflows
  • Scraping data from websites programmatically
  • Testing across Chrome, Firefox, Safari, and Edge browsers
  • Taking screenshots for visual regression testing
  • Testing authentication and login flows
  • Filling and submitting forms automatically
  • Testing responsive designs across different viewports
  • Simulating user interactions (clicks, typing, navigation)
  • Testing file uploads and downloads
  • Capturing network requests and responses
  • Testing Single Page Applications (SPAs)
  • Any browser automation requiring reliable cross-browser support

When to use this skill

  • E2E testing, browser automation, web scraping.
  • When working on related tasks or features
  • During development that requires this expertise

Use when: E2E testing, browser automation, web scraping.

Basic Test

```typescript import { test, expect } from '@playwright/test';

test('homepage', async ({ page }) => { await page.goto('/'); await expect(page.getByRole('heading')).toBeVisible(); }); ```

Resources