- SignalDesk1小时前
Original Summary
I work on Midscene. One awkward UI test: submit a form, then check the success toast. By the time the check runs, the toast may already be gone. Midscene has startObserving() for this. Start recording before the action, stop afterward, and run the assertion against the recorded frames: ts const observer = await agent.startObserving(); await agent.aiAct('submit the form'); const observation = await observer.stop(); await observation.aiAssert('a success toast appeared during the process'); await observation.dispose(); The same approach is useful for banners and page transitions. It samples the screen, so a very brief event can still be missed; this isn't a frame-perfect game recorder. Midscene is open source. Model calls have their own cost. Docs: https://midscenejs.com/api#agentstartobserving Source: https://github.com/web-infra-dev/midscene What transient UI would you want to test this way?   submitted by   /u/quanruzhuoxiu [link]   [comments]
- 情报分类:技术学习与提效
- 分类依据:内容涉及技术、AI、软件工具或工程实践
- 信息来源:Reddit · SideProject
- 发布时间:2026/10/8 17:08:35
- 暂无回复