-
Notifications
You must be signed in to change notification settings - Fork 752
Description
Is there an existing issue for this?
Steps to reproduce
appId: com.example.app
-
launchApp
-
tapOn:
id: "open_details" -
tapOn:
id: "go_back" -
assertVisible:
id: "item_title"
Actual results
After navigating back to Screen A:
Maestro cannot find the element
Maestro Studio shows "element not in the tree"
Selectors like testID, text, and accessibilityLabel do not work
The element is still visible in the UI
However:
Scrolling using coordinates still works
Tap by coordinates works
This indicates the element is rendered visually but missing from the accessibility hierarchy used by Maestro.
Expected results
After navigating back to Screen A, Maestro should still be able to detect and interact with elements using:
testID
text selectors
accessibility labels
The element should appear in the Maestro hierarchy tree and allow interactions such as:
-
tapOn:
id: "element_id" -
assertVisible:
id: "element_id"
About app
About the App
Framework: React Native
Navigation Library: React Navigation
Platform tested: iOS
Testing tool: Maestro
App UI details
The screen contains components rendered with React Native views.
Elements have testID and accessibilityLabel.
Some elements are inside lists (e.g., FlatList / ScrollView) if applicable.
After navigating to another screen and returning, the UI appears visually correct but elements are missing from the accessibility hierarchy.
Additional Notes
The problem happens only on iOS.
The same Maestro flow works correctly on Android.
In Maestro Studio, the element does not appear in the hierarchy tree after navigating back.
Interactions using coordinates still work.
About environment
Testing tool: Maestro
Version: 2.3.0
App framework: React Native
Version: 0.78.2
Platform: iOS
Version: 17.0
Device(s) tested:
iPhone 15 Simulator
iPhone 15 Real Device
Result:
Issue occurs on both simulator and real device ❌
Android tests work correctly ✅
The element is visible in the UI but does not appear in the Maestro accessibility hierarchy after navigating back to the screen.
Logs
Logs
<!-- Replace this line with your logs. *DO NOT* remove the backticks! -->
Maestro version
2.3.0
How did you install Maestro?
install script (https://get.maestro.mobile.dev)
Anything else?
No response