maestro icon indicating copy to clipboard operation
maestro copied to clipboard

[1.30.4] Not visible elements treated as if they are visible

Open robwalkerco opened this issue 1 year ago • 8 comments

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.:

  1. Using a React Native ScrollView
  2. Have some content with a unique testID that is scrolled just outside of the visible portion of the ScrollView
  3. Attempt tapOn the testID
  4. Observe that the assertion or action completes in Maestro, but that the tap never happened on the element with the testID
  5. Attempt to assertVisible on the testID
  6. 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

robwalkerco avatar Jul 24 '23 15:07 robwalkerco

I have the exact same problem!

mdethlefs avatar Jul 27 '23 14:07 mdethlefs

Same issue. elements outside the visible area of a ScrollView are considered visible.

amrlabib avatar Aug 15 '23 18:08 amrlabib

Same issue here with Flutter Dropdown

JigneshWorld avatar Aug 17 '23 10:08 JigneshWorld

Same issue - react native

niall-shaw avatar Aug 17 '23 14:08 niall-shaw

Same issue, can not test the form properly because of fields behind header/footer Screenshot 2023-09-15 at 8 58 04 AM

olegmalk avatar Sep 15 '23 04:09 olegmalk

the same issue on 1.29.0 (scroll not working)

Darex1991 avatar Feb 29 '24 07:02 Darex1991

Experiencing the same issue on 1.36.0 (Native iOS)

I've also tried the additional parameters with no success:

  • visibilityPercentage: 100
  • centerElement: true

macrae22 avatar Mar 26 '24 10:03 macrae22

Facing the same with PageView in Flutter

Maestro can only see the first page only

Abdelazeem777 avatar Apr 28 '24 07:04 Abdelazeem777