maestro
maestro copied to clipboard
[1.30.4] Not visible elements treated as if they are visible
Describe the bug
When dealing with elements in a ScrollView, items that are not yet visible are treated as if they are visible. This causes tapOn
, assertVisible
, scrollUntilVisible
, etc to fail.
To Reproduce Steps to reproduce the behaviour, e.g.:
- Using a React Native ScrollView
- Have some content with a unique testID that is scrolled just outside of the visible portion of the ScrollView
- Attempt tapOn the testID
- Observe that the assertion or action completes in Maestro, but that the tap never happened on the element with the testID
- Attempt to assertVisible on the testID
- Observe that Maestro considers it visible although it's outside of the visible portion of the ScrollView.
Expected behaviour
When dealing with an action that expects an element to be visible, and it's not visible, I expect the action to fail.
In the video below you can see that although the element "sizePickerDrawer.size.8"
is not visible in the scrollview (with a red border), the tapOn action is succeeding, but the tap never happens.
Screenshots
https://github.com/mobile-dev-inc/maestro/assets/6524830/11a5288d-748b-46a4-918b-8b2459e94774
Environment information (please complete the following information):
- Maestro version: 1.30.4
- Platform: iOS 17.0
- Framework: React Native
- Device model and OS version: iPhone 14 iOS 17.0
- Simulator
- Host: Mac M1
Workspace (if applicable) Sorry, it's not available
Bugreport output (if applicable) N/A
Additional context Let me know if there is anything I can help with
I have the exact same problem!
Same issue. elements outside the visible area of a ScrollView are considered visible.
Same issue here with Flutter Dropdown
Same issue - react native
Same issue, can not test the form properly because of fields behind header/footer
the same issue on 1.29.0 (scroll not working)
Experiencing the same issue on 1.36.0
(Native iOS)
I've also tried the additional parameters with no success:
- visibilityPercentage: 100
- centerElement: true
Facing the same with PageView in Flutter
Maestro can only see the first page only