跳到正文
Skillpedia
测试14k · #11245

agent-browser

它能做什么

这项技能使用 agent-browser 命令行工具打开网页、执行操作并检查显示的内容。适合需要确认网站能按用户实际体验运行的人。

适用场景

  • ✓当你想在真实浏览器中检查网页或管理后台页面的行为是否正确的时候。
  • ✓当你需要截图,作为某个操作之后页面外观的证据的时候。
  • ✓当你想确认点击或提交表单之后,页面显示了预期结果的时候。

技能链接

https://github.com/emdash-cms/emdash/blob/main/skills/agent-browser/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/emdash-cms/emdash/blob/main/skills/agent-browser/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在浏览器中打开我网站的登录页面,登录,并为仪表板截一张图?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会在一个命名的浏览器会话中打开页面,读取页面结构,执行操作,然后检查新的状态以及任何控制台错误。过程中它可以截取屏幕截图。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Test interfaces with agent-browser

Use the installed agent-browser CLI for rendered, user-facing verification. Load its version-matched instructions before relying on command syntax:

agent-browser skills get core --full

Use a specialized bundled guide when the target requires one. agent-browser skills list shows the available guides.

Verification loop

  1. Start or identify the target application and record the exact URL and viewport.
  2. Open the page in a named session.
  3. Take an accessibility snapshot and identify controls by role, label, or snapshot reference.
  4. Perform the user action.
  5. Wait for the resulting state, then take a fresh snapshot. References can become stale after navigation or a substantial DOM update.
  6. Verify the observable result, console errors, and relevant network behavior.
  7. Capture screenshots when visual evidence helps establish the result.

For EmDash admin testing, authenticate through the development bypass rather than attempting to automate passkeys:

agent-browser open 'http://localhost:4321/_emdash/api/setup/dev-bypass?redirect=/_emdash/admin'

Use auth/dev-bypass instead when setup is already complete.

Interaction guidance

  • Prefer role and label locators when they express the user-facing control clearly. Use snapshot references for efficient exploration.
  • Re-snapshot after a dialog opens, a route changes, or content is replaced.
  • Wait for a selector or visible state instead of adding a fixed delay unless timing itself is under test.
  • Use a named session for flows that depend on cookies or storage. Close sessions that are no longer needed.
  • Check agent-browser console and agent-browser errors when the UI behaves unexpectedly.
  • Use agent-browser network requests when the result depends on a request or response boundary.

Evidence

Record the path tested, inputs, viewport, expected result, actual result, and any console or request failures. For UI changes, capture before-and-after screenshots of every affected screen.

Save screenshots inside the task workspace with descriptive filenames. Inspect the saved image before reporting success; a completed screenshot command does not prove that the intended state was visible.

Browser exploration does not replace a regression test when stable automated coverage can protect the behavior. Convert a confirmed defect into the narrowest meaningful automated test when the task includes implementation.

常见问题

它能替代自动化测试吗?

不能。当需要可重复的回归测试时,确定性的测试套件是更好的选择。

它如何找到页面上的按钮?

它读取页面的无障碍信息,利用标签和角色来找到控件。

它能显示错误吗?

能。作为验证的一部分,它会检查控制台错误和相关的网络行为。

详情

作者的原始描述

Use the agent-browser CLI to exercise web interfaces, inspect rendered accessibility state, verify interactions, and capture screenshots. Use for browser-based UI testing and evidence collection. Do not use as a substitute for deterministic Playwright coverage when an automated regression test is the requested deliverable.

repo: emdash-cms/emdash

热度

GitHub 星标
14k
排名
#11245
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能