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

recording-browser-flow-as-testrecording 浏览器 flow AS 测试

Agent Skill

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

总安装

282

周安装

12

GitHub Stars

206

下载量

99
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:recording-browser-flow-as-test(recording 浏览器 flow AS 测试)
来源仓库:https://github.com/spencerpauly/awesome-cursor-skills
仓库路径:skills/recording-browser-flow-as-test
安装命令:
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill recording-browser-flow-as-test
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill recording-browser-flow-as-test

简介

recording-browser-flow-as-test 用于辅助测试设计、自动化测试和回归验证。

  • 适合让 Agent 编写单元测试、端到端测试或根据日志定位问题。
  • 使用时需确认项目测试框架、运行命令和夹具数据。
  • 涉及浏览器或外部服务时应区分本地模拟与生产环境。
  • 通过 npx skills add 命令从指定仓库安装并使用该技能。

SKILL.md

Recording Browser Flow as Playwright Test

Use the browser MCP as a recorder: every navigation, click, fill, and keypress becomes a row in a script. The agent then translates that trace into a Playwright test file in the repo (or a snippet to paste into an existing spec).

This is Cursor-native because it combines browser_snapshot (refs + roles + names) with structured actions — not a separate recorder extension.

Prerequisites

  • Target app reachable (e.g. dev server running); use finding-dev-server-url if needed.
  • Repo has or will have Playwright installed (@playwright/test). If not, add it with adding-e2e-tests or the project’s standard setup.

Recording workflow

1. Define the flow

One sentence scope, e.g. “Log in, open Settings, toggle dark mode, save.”

2. For each step, in order

  1. browser_snapshot — get the accessibility tree and element refs.
  2. Choose the smallest interaction:

- browser_click with ref from snapshot (not coordinate clicks unless required). - browser_fill or browser_type for inputs. - browser_select_option for selects. - browser_navigate for full URL changes.

  1. Log the step in a structured list the main agent keeps:

- Step number - Action verb (navigate, click, fill, press, select) - Locator strategy for Playwright — prefer: - getByRole('button', {name: '...'}) - getByLabel('...') - getByPlaceholder('...') - getByTestId('...') if the app uses test IDs - Value (for fills), URL (for navigates) - Optional: short assertion (“expect URL to contain /settings”)

  1. After actions that change the DOM or navigate, take a new browser_snapshot before the next interaction.
  2. If the flow must wait for async content, use browser_wait_for or short incremental waits per cursor-ide-browser guidance — then snapshot again.

3. Add assertions

From the final snapshot and URL, add at least:

  • expect(page).toHaveURL(...) or URL fragment check
  • One visible outcome: text, role, or test id

4. Generate Playwright output

Emit a test file, e.g. tests/recorded/<flow-name>.spec.ts, containing:

  • test.describe and test('...', async ({page}) => {...})
  • Steps as await page.goto(...), await page.getByRole(...).click(), etc.
  • No raw snapshot refs in the final file — they are session-specific.

5. Run and harden

npx playwright test tests/recorded/<flow-name>.spec.ts

Fix flakiness: prefer expect(locator).toBeVisible() before clicks, use toPass() retries for async lists, avoid arbitrary waitForTimeout except as last resort.

Tips

  • Stable selectors: roles and accessible names beat CSS from devtools. Add data-testid in app code if names are ambiguous.
  • Auth: if the flow needs login, use env vars for test credentials or Playwright storageState — never commit secrets.
  • Parallel runs: ensure test data does not collide with other tests.

When not to use

  • Flows that require manual 2FA, captchas, or email links — stop and ask the user for a test bypass or mock.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.61%
按下载量换算34

Claude

27.68%
按下载量换算27

Cursor

20.48%
按下载量换算20

Gemini CLI

8.92%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills