maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Multiple Taps happening on Jetpack Compose app

Open sanskar10100 opened this issue 3 years ago • 1 comments

I'm trying out version 1.4.0 of Maestro on a Jetpack Compose app, and wrote this yaml:

appId: dev.sanskar.photoplay
---
- launchApp
- tapOn: "Thor: Love and Thunder"
- tapOn: "Add To Watchlist"
- tapOn: "MCU"
- tapOn: "Save"
- back
- tapOn: "Thor: Love and Thunder"
- tapOn: "Add To Watchlist"

But, as observed in the video, there are multiple taps on the MCU entry. I was expecting only one tap to happen. Could it be because the list recomposes on tap?

sanskar10100 avatar Sep 01 '22 07:09 sanskar10100

Thanks for reporting! This is sort of a feature and a bug at the same time. What is happening here is that Maestro tries to compare view hierarchy before and after tap, sees no difference (checkbox status does not produce a new view hierarchy) and decides to try tapping again.

To disable this behaviour, you can replace command with this:

- tapOn:
      text: "MCU"
      retryTapIfNoChange: false

dmitry-zaitsev avatar Sep 01 '22 13:09 dmitry-zaitsev

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. Thank you for helping keep us our issue tracker clean!

github-actions[bot] avatar Jul 11 '24 19:07 github-actions[bot]