maestro icon indicating copy to clipboard operation
maestro copied to clipboard

[1.31.0] TapOn within a specific point in an element doesn't work

Open hira-jafri opened this issue 1 year ago • 5 comments

Describe the bug

Tap on specific point within an element is not working on ios. Instead of clicking on a point within the element, it taps on the point within the screen (ignoring id/text selector altogether). Have not tried on android. Reference: https://maestro.mobile.dev/api-reference/commands/tapon#tapping-on-a-specific-point-within-another-element

To Reproduce 1- Start ios simulator 2- Try to tap on a specific point within an element using this code:

- tapOn: id: ${selector} point: "25%, 85%"

Expected behavior The tap should find the point within the element and then tap.

Screenshots No screenshots needed. Link to Slack conversation: https://mobile-dev-inc.slack.com/archives/C041FU72T54/p1693881938655019

Environment information (please complete the following information):

  • Maestro version 1.31.0
  • Platform: iOS 16.2
  • Framework: React Native
  • Device model and OS version: iPhone 14
  • Simulator
  • Host Mac M1

Workspace (if applicable) Please share your workspace with Flow files and application binary if you are able to do so as that greatly helps in reproduction efforts.

Bugreport output (if applicable) The zip files created when maestro bugreport can be uploaded here as well if applicable.

Additional context Add any other context about the problem here.

hira-jafri avatar Sep 06 '23 05:09 hira-jafri

I see the same issue in Android as well

ponsuyambu avatar Jan 03 '24 20:01 ponsuyambu

I have the same problem

HectorNJ avatar Mar 13 '24 19:03 HectorNJ

We're seeing the same issue as well

jborchardt avatar Jul 03 '24 08:07 jborchardt

Affects us as well

TarasBekhta avatar Jul 03 '24 08:07 TarasBekhta

The docs are a lie.

If point isn't null then Orchestra.tapOnPointV2Command gets called instead of tapOnElement. tapOnPointV2Command has no notion of the tapped element. It needs to call findElement(command.selector) and if it find something pass the resulting element and hierarchy down to Maestro.tapOnRelative, which currently only ever uses cachedDeviceInfo.widthGrid (and height), when it should be using the bounds of the element

but tbh I'd probably go with merging the tap on point & tap on element logics

JRWilding avatar Jul 04 '24 19:07 JRWilding

Same issue here

Antho2407 avatar Jul 23 '24 13:07 Antho2407