fix: address the Maps search box by id, and re-prove Phase 5

The Maps omnibox hint rotates: it read "Search here" in the Phase 5 run and
"Try petrol stations, ATMs" in the AUD-128 re-verification, so the recipe's
text match on it failed. The resource id does not rotate.

- internal/ui: add Find/FindID and the "id:" selector; Find dispatches an
  id: selector to the resource id and everything else to text as before.
- internal/recipe: wait/tap/wait_gone/tap_if and the tap helper use Find, so a
  recipe may name a resource id. Guards stay text-only.
- recipes/maps_navigate.recipe: wait/tap id:search_omnibox_text_box.
- tests for the id selector; docs and README updated.
This commit is contained in:
2026-10-17 09:12:01 +11:00
parent a7c07c645e
commit be22eba386
9 changed files with 206 additions and 26 deletions

View File

@@ -245,14 +245,14 @@ func cmdDump(r *adb.Runner) error {
func cmdFind(r *adb.Runner, args []string) error {
if len(args) != 1 {
return fmt.Errorf("usage: artemis find <text>")
return fmt.Errorf("usage: artemis find <text|id:resource_id>")
}
return ensurePhone(r, func() error {
h, err := ui.Dump(r)
if err != nil {
return err
}
matches := h.FindText(args[0], false)
matches := h.Find(args[0], false)
if len(matches) == 0 {
return fmt.Errorf("no element matching %q", args[0])
}