browser-test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrowser Test
浏览器测试
Automated UI testing. Now backed by a recorded RVF session container instead of an ephemeral run, so every test produces a replayable artifact.
自动化UI测试。现在由录制的RVF会话容器提供支持,而非临时运行的测试,因此每次测试都会生成一个可回放的工件。
When to use
适用场景
- Verifying UI functionality, user flows, or that frontend changes work in a real browser.
- Producing a baseline session that future regressions can diff against.
- Re-running a stored test session when CI fails (no need to re-author the test).
- 验证UI功能、用户流程,或前端变更在真实浏览器中的运行情况。
- 生成基准会话,供后续回归测试进行对比。
- 当CI失败时,重新运行存储的测试会话(无需重新编写测试用例)。
Steps
步骤
- Record the test run by composing :
browser-record- Allocates an RVF container with .
--kind browser-session - Begins a ruvector trajectory.
- Allocates an RVF container with
- Drive interactions — ,
browser_open,browser_click,browser_fill,browser_type. Each action emits abrowser_select.trajectory-step - Wait for elements / network idle via before assertions.
browser_wait - Validate with /
browser_get-text/browser_get-value/browser_get-title. Validation outcomes go intobrowser_get-urlinside the RVF container.findings.md - Screenshot before / after key interactions for visual regression. Filenames follow .
<step-id>.png - Snapshot the accessibility tree at navigation boundaries.
- End the session: ,
trajectory-end --verdict pass|fail, AgentDB index inrvf compact.browser-sessions - (Optional) Diff against : invoke
--against <prior-session-id>to compare the new run with a baseline.browser-screenshot-diff
- 录制测试运行:整合功能:
browser-record- 分配一个类型的RVF容器。
--kind browser-session - 启动ruvector轨迹。
- 分配一个
- 驱动交互——使用、
browser_open、browser_click、browser_fill、browser_type。每个操作都会生成一个browser_select。trajectory-step - 等待:在断言前通过等待元素加载或网络空闲。
browser_wait - 验证:使用/
browser_get-text/browser_get-value/browser_get-title进行验证。验证结果会存入RVF容器内的browser_get-url文件。findings.md - 截图:在关键交互前后进行截图,用于视觉回归测试。文件名遵循格式。
<step-id>.png - 快照:在导航节点处捕获无障碍树快照。
- 结束会话:执行、
trajectory-end --verdict pass|fail,并在AgentDB的rvf compact中建立索引。browser-sessions - (可选)与进行对比:调用
--against <prior-session-id>将新运行结果与基准版本进行比较。browser-screenshot-diff
Navigation
导航操作
- /
browser_backfor history navigationbrowser_forward - to refresh the page
browser_reload - to scroll to elements or coordinates
browser_scroll
- 使用/
browser_back进行历史导航browser_forward - 使用刷新页面
browser_reload - 使用滚动到指定元素或坐标
browser_scroll
What changed from v0.1.0
与v0.1.0版本的差异
- The skill no longer ends with alone — it ends with the session-end protocol.
browser_close - Selectors discovered during the test land in (host:intent), so the next test can find them by embedding similarity.
browser-selectors - Validation outputs pass before any LLM-facing summary; injection-flagged content is quarantined to
aidefence_is_safe.findings.md - The same skill, used in CI, now produces an artifact that can re-drive.
/ruflo-browser replay
- 该技能不再仅以结束——而是通过会话结束协议来终止。
browser_close - 测试过程中发现的选择器会存入(host:intent),以便下次测试通过嵌入相似度匹配找到它们。
browser-selectors - 验证输出在生成面向LLM的摘要前会经过检查;被标记为注入风险的内容会被隔离到
aidefence_is_safe中。findings.md - 同一技能在CI中使用时,现在会生成一个可通过重新驱动的工件。
/ruflo-browser replay
Tips
小贴士
- Use before assertions to handle async rendering.
browser_wait - For visual regression, save the parent session id and pass on the next run.
--against <id> - Use for custom JavaScript assertions — but redact any returned strings via the
browser_evalgate before logging.aidefence_is_safe
- 在断言前使用来处理异步渲染。
browser_wait - 对于视觉回归测试,保存父会话ID并在下次运行时传入参数。
--against <id> - 使用进行自定义JavaScript断言——但在记录日志前,需通过
browser_eval网关对返回的字符串进行脱敏处理。aidefence_is_safe