.ad files cannot reach off-screen elements, and test --platform skips files without a platform header
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
Start in the replay/.ad parser and the command flag table where scroll --until is marked recorded: false; the scroll handler is what rejects the extra argument, and wait --raw fails through the same argument splitter. For part 2, find where test --platform assembles the internal missing platform metadata skip reason and where the user-facing No replay tests matched error is built. Part 3 is a flag table for help scripting. Done means scroll down --until 'id="x"' works inside a .ad file, the platform error names the skip reason, and the docs list which CLI flags are valid in .ad files.
由索引模型根据 Issue 内容生成。
描述
I use agent-device test with .ad files to replay example apps on an Android emulator and an iOS simulator. Three things make long screens hard to replay in a deterministic way. Version: 0.21.20.
1. .ad files cannot reach an off-screen element
wait, is, and press only see elements that are on screen. That is fine. But I cannot get an element on screen in a .ad file in a viewport-independent way:
scroll down --until 'label="ok:ready"'works from the CLI. In a.adfile it fails withscroll amount must be a number, because--untilis not parsed (it isrecorded: falsein the flag table).wait id="x" --rawandwait --raw id="x"both fail in a.adfile (is followed by unexpected extra arguments/mixes plain word "--raw").
So a .ad file has to use fixed scroll down steps. They pass on one screen size and fail on another. Example: the same flow passed on a Medium Phone emulator and failed on an iPhone 17 simulator, because the target button was one page lower.
Repro:
open "com.example.app" --relaunch
scroll down --until 'id="far-button"'
press id="far-button"
close
Expected: the scroll repeats until far-button is visible, as it does in the CLI.
Actual: scroll amount must be a number.
Request: support --until <selector> for scroll in .ad files (and replays), or give .ad files another way to bring a selector on screen.
2. test --platform skips files that have no platform metadata
agent-device test e2e/*.ad --platform android --serial emulator-5554 fails with No replay tests matched for --platform android. when the .ad files have no platform header. Without --platform the same files run on that serial. The skip reason (missing platform metadata for --platform android) is only in the internal entry, not in the error the user sees.
Request: when --serial or --udid already selects the device, treat header-less files as runnable on that platform, or say in the error that the files were skipped because they have no platform header, and how to add one.
3. Docs
I could not find the .ad syntax for flags per command, or a list of which CLI flags work inside .ad files. A short table in help scripting would have saved me some time.
Thanks for the tool. My workaround for 1 is an accessible element that stays on screen and carries all result values in its label. It works, but it means changing the app for the test runner.
- 主要语言
- TypeScript
- 星标
- 4.8k
- 派生
- 315
- 平均合并
- 11 小时 37 分钟
- 30 天内合并 PR
- 556
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 4/5 3-5 天 新手友好度 45/100
callstack/agent-device#3238 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
callstack/agent-device#3229 ·
维护者通常 1 天内回复
-
fix(apple-runner): fence prep spawns after teardown or last-waiter cancellation可能已有人在做 @thymikee 于 1 天前认领。 未关闭needs-triage
难度 4/5 3-5 天 新手友好度 42/100
callstack/agent-device#3220 ·
维护者通常 1 天内回复
-
Explicit macOS surface is lost from recorded actions and replay scripts可能已有人在做 @janicduplessis 于 1 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
callstack/agent-device#3216 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
难度 2/5 1 小时以内 新手友好度 85/100
capricorn86/happy-dom#2474 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
JSerwatka/letterboxd-tweaks#81 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
siyuan-note/siyuan#20165 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
polkadot-js/phishing#5716 ·
-
bug
难度 2/5 1-3 小时 新手友好度 90/100
juice-shop/juice-shop#3662 ·
维护者通常 1 天内回复