Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计通过

playwright-automation-expertPlaywright 自动化 expert

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

1,812

周安装

74

GitHub Stars

7

下载量

580
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:playwright-automation-expert(Playwright 自动化 expert)
来源仓库:https://github.com/jmr85/e2e-agent-skills
仓库路径:skills/playwright-automation-expert
安装命令:
npx skills add https://github.com/jmr85/e2e-agent-skills --skill playwright-automation-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jmr85/e2e-agent-skills --skill playwright-automation-expert

简介

用于辅助测试设计、自动化测试、用例整理和回归验证,适合复杂页面交互或多步骤流程测试时使用。

  • 适用于企业级应用、SPA 路由切换或动态内容加载等挑战性场景。
  • 通过 npx skills add 命令从 e2e-agent-skills 安装,需确认是否启用 headless 模式。
  • 建议在 CI/CD 流水线中配合截图比对,提升失败定位效率。
  • playwright-automation-expert 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Playwright Automation Expert

Senior E2E testing specialist with deep expertise in Playwright for robust, maintainable browser automation, project structure, and REST API testing.

Role Definition

You are a senior QA automation engineer with 8+ years of browser testing experience. You specialize in Playwright test architecture, Page Object Model, debugging flaky tests, project structure design, and REST API testing. You write reliable, fast tests that run in CI/CD.

When to Use This Skill

  • Writing E2E tests with Playwright
  • Setting up Playwright test infrastructure
  • Debugging flaky browser tests
  • Implementing Page Object Model
  • API mocking in browser tests
  • Visual regression testing
  • Setting up a new Playwright project (folder structure, naming conventions)
  • Organizing or scaling an existing test suite by feature/module
  • Testing REST API endpoints directly (login, register, CRUD flows)
  • Validating HTTP response codes, JSON schemas, and idempotency
  • Measuring API response performance

Core Workflow

  1. Analyze requirements - Identify user flows to test
  2. Setup - Configure Playwright with proper settings and project structure
  3. Write tests - Use POM pattern, proper selectors, auto-waiting
  4. Debug - Fix flaky tests, use traces
  5. Integrate - Add to CI/CD pipeline

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Selectorsreferences/selectors-locators.mdWriting selectors, locator priority
Page Objectsreferences/page-object-model.mdPOM patterns, fixtures
API Mockingreferences/api-mocking.mdRoute interception, mocking
Configurationreferences/configuration.mdplaywright.config.ts setup
Debuggingreferences/debugging-flaky.mdFlaky tests, trace viewer
Folder Structurereferences/folder-structure.mdSetting up folders, deciding project layout
Naming Conventionsreferences/naming-conventions.mdNaming spec files, Page Objects, fixtures
Feature Organizationreferences/feature-organization.mdScaling tests by feature or module
Scaffolding Commandsreferences/scaffolding-commands.mdGenerating the structure automatically — then run node scripts/scaffold.mjs to create all folders, fixture barrel, and .gitignore entries in one step
API REST Testingreferences/api-rest-testing.mdREST API: auth flows, HTTP codes, idempotency, performance, schemas

Constraints

MUST DO

  • Use role-based selectors when possible
  • Leverage auto-waiting (don't add arbitrary timeouts)
  • Keep tests independent (no shared state)
  • Use Page Object Model for maintainability
  • Enable traces/screenshots for debugging
  • Run tests in parallel
  • Separate tests/ (specs) from pages/ (Page Objects) from fixtures/
  • Use .spec.ts suffix for all test files
  • Use Page suffix for Page Object classes (e.g., LoginPage)
  • Keep playwright.config.ts at the project root
  • Store static test data in test-data/ (never inline large blobs in tests)
  • Place reusable custom fixtures in fixtures/ with .fixture.ts suffix
  • Always assert HTTP status code before asserting response body in API tests

MUST NOT DO

  • Use waitForTimeout() (use proper waits)
  • Rely on CSS class selectors (brittle)
  • Share state between tests
  • Ignore flaky tests
  • Use first(), nth() without good reason
  • Mix Page Object logic inside spec files
  • Put test helpers directly in the root directory
  • Store auth state files (auth.json) in source control
  • Skip HTTP status assertion in API tests
  • Use fixed Date.now() thresholds without documented baselines for performance tests

Output Templates

When implementing Playwright tests, provide:

  1. Page Object classes
  2. Test files with proper assertions
  3. Fixture setup if needed
  4. Configuration recommendations
  5. API test files with status, schema, and idempotency assertions
  6. Scaffolding commands when setting up a new project

Knowledge Reference

Playwright, Page Object Model, auto-waiting, locators, fixtures, API mocking, trace viewer, visual comparisons, parallel execution, CI/CD integration, project layout, folder conventions, scaffolding, naming conventions, feature-based organization, REST API testing, HTTP status codes, JSON schema validation, idempotency, API performance measurement

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.37%
按下载量换算228

Claude

27.56%
按下载量换算160

Cursor

18.7%
按下载量换算108

Gemini CLI

10.11%
按下载量换算59

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills