Repository navigation
Keep a Maestro tap on its element when the list moves first - #1813
Merged
Merged
Conversation
A tap right after a scroll waits for its element to stop moving, finding it in each new hierarchy by its attributes. Look-alike elements, such as the settings switches the flows tap by "0|1" inside a row's id, matched more than once, so the tap went to where the element had been before the list settled: on the open iPhone Duo, 08-settings turned the Calendar Alert row's neighbor instead. A new Maestro patch tells look-alikes apart by the ids of the elements that hold them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5JNTkg61zLdbc9SCgGoMd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5JNTkg61zLdbc9SCgGoMd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Rui · project thread
What
Adds
scripts/e2e/maestro/maestro-look-alike-elements.patchto the patched Maestro build.Why
When a tap comes right after a scroll, Maestro waits for its element to stop moving and finds it again in each new hierarchy by its attributes (bounds aside). Elements that look alike match more than once. The settings switches the flows tap with
text: '0|1'inside a row's id all read 1 or 0, so the element counted as gone, and after 3 s Maestro tapped where it had been before the list settled. On the open iPhone Duo,08-settingsscrolled back to the Calendar Alert row, found its switch while the list was still moving, and the tap landed one row up on Event Length.The patch:
childOfthe whole screen it was found on, as one found withoutchildOfalready has, rather than a hierarchy of the element alone.This applies to every
childOftap and every look-alike element, not only this flow.Testing
build.shand builds.maestro-clientViewHierarchyTestandUiElementTest: 12/12 pass.maestro-orchestra: 457 pass, 3 skipped.02-resetthen08-settingson the open and half-open iPhone Duo, twice each with this build and once each with the current build. With the current build the log shows "Element is not present in the fresh hierarchy" 28 times (open) and 14 times (half-open), and the open run fails at the Calendar Alert toggle. With this build that line never appears, and every tap after a scroll finds its element. The open run gets through every settings toggle.08-settingsstill fails on the Duo for reasons this change doesn't touch: in the half-open layout the Calendar Alert row has no switch element of its own, and on the open Duo the system Calendar app's search doesn't show the synced assignment.🤖 Generated with Claude Code
https://claude.ai/code/session_01A5JNTkg61zLdbc9SCgGoMd