Skip to content

v1.5.0 — 截图工具(Screenshot Tool)

Choose a tag to compare

@SamXiaBing SamXiaBing released this 25 Aug 07:46
· 11 commits to main since this release

截图工具(Screenshot Tool)

Added

  • adb_screenshot 工具:screencap(设备)→ pull(host)→ 落盘 PNG(screenshotDir,缺省 <baselineDir>/screenshots),返回 savedTo / bytes / width / height
  • 纯函数 pngDimensions 从 PNG IHDR 解析宽高(无效签名安全返回 undefined)
  • 设备端临时文件 best-effort 清理;本地目录自动创建
  • 补缺口:RPC screenshot 端点早有(v1.1 保留),工具一直没补——现在 agent 能直接截图留证(崩溃现场/UI 状态/测试前后对比),是 ROADMAP ③截图视觉解读的落地原语

Verified:单测 84 全绿(新增 7 例:pngDimensions 3 + path 1 + capture 流程 3,含 screencap 失败与 pull 无产物路径)。真机级验证通过(emulator-5556):截图 1280x720 PNG 734KB,签名/尺寸解析正确。


EN: adb_screenshot — capture the device screen into a local PNG (screencap → pull), returning path, byte size, and pixel dimensions. Durable evidence for crash scenes / UI states / test frames; the primitive behind the vision features. 84 unit tests green, emulator verified.