Repository navigation
Report a stuck accessibility tree instead of timing out - #168
Merged
Merged
Conversation
bitomule
force-pushed
the
worktree-t-mav-161-empty-tree-after-xcuitest
branch
from
December 2, 2026 23:50
e0ba1f8 to
2173f09
Compare
bitomule
force-pushed
the
worktree-t-mav-161-empty-tree-after-xcuitest
branch
from
December 3, 2026 00:12
2173f09 to
4f0d659
Compare
After an XCUITest run on a simulator, AXe and idb return an empty tree for every app launched afterwards until the simulator reboots. Waits, flow wait steps and ui tree/find now fail with ax_tree_stuck_empty when the tree is empty while the screen is not blank, with the simulator reboot as the way out, instead of a bare wait_timeout.
bitomule
force-pushed
the
worktree-t-mav-161-empty-tree-after-xcuitest
branch
from
December 3, 2026 09:55
4f0d659 to
1bd9449
Compare
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.
Closes #161.
Problem
After an XCUITest runner has driven a simulator, AXe and idb return an empty
AXApplicationfor every app launched afterwards, until the simulator reboots. mav flows then failed with a barewait_timeout, which reads like a wrong selector.Change
ax_tree_stuck_empty, emitted when the accessibility tree is empty while the screen is not blank. The second signal is a fresh screenshot that is not a single flat colour, or baguette's tree still listing elements. A blank screen (splash, launch in progress) keeps the old timeout.mav ui wait, flowwait/waitUntil/assertsteps, the after-input--wait-*path,mav ui treeandmav ui find.cause,probe,udidandnext=with the exactxcrun simctl shutdown <udid> && xcrun simctl boot <udid>for that simulator.internal/mav/axtree_stuck.go;cli.goonly gets small call-site changes.Recovery
No recovery short of a reboot is offered: the issue measured that relaunching, reinstalling and calling idb do not bring the tree back, and I could not reproduce the XCUITest state here to test another route. The existing
mav ui treeauto-reboot is unchanged. The baguette fallback for reads is not included, since it would still miss id selectors, as the issue notes.Tests
New tests cover the visible-screen, blank-screen and populated-tree cases for
ui wait, a flowwaitstep andui tree, plus the image check. With the call-site changes reverted, the three behaviour tests fail; with them they pass.go test ./...passes.