You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to test a feature of an app that requires the pinch gesture to zoom in and out, for example on a map. However, Maestro doesn't currently support this type of gesture. I think that's because it's difficult to implement multi-touch gestures. But I have a proposal that could help us to have this type of gesture.
Proposal
Pinch Gesture Command
Android and iOS allow you to perform the pinch gesture by touching the screen with just one finger. All you need to do is double tap, but keeping your finger on the screen on the second tap and drag up or down (demo).
In the videos below you can check out the behavior on both platforms. I wish I had used the same app to demonstrate, as Apple Maps uses the pinch interaction differently, so please ignore this difference in the videos.
If you test with the same target component, you'll see that the behavior is the same. The difference is that on iOS you drag up to zoom in while on Android you need to drag down.
Android
iOS
android-single-touch-pinch-simulation.mp4
ios-single-touch-pinch-simulation.mp4
How to implement
Since we have the tapOn and swipe commands, I tried to use them to simulate the pinch gesture, but was unsuccessful. Also, I tried to change the tapOn property waitToSettleTimeoutMs to 0 ms to decrease the time between the two commands but again, without success. The time between commands is not short enough.
# Unsuccessful attempt using existing commands
- tapOn:
point: 50%, 50%
waitToSettleTimeoutMs: 0
- swipe:
start: 50%, 50%
direction: DOWN
So the proposal is very simple: Create a new command that executes tapOn and swipe inner behavior in sequence
I haven't delved into how they work internally, but I see a great possibility that if they are run in sequence with a very short time between them, this could be possible.
Is this proposal viable?
Thanks
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Use case
I'd like to test a feature of an app that requires the pinch gesture to zoom in and out, for example on a map. However, Maestro doesn't currently support this type of gesture. I think that's because it's difficult to implement multi-touch gestures. But I have a proposal that could help us to have this type of gesture.
Proposal
Pinch Gesture Command
Android and iOS allow you to perform the pinch gesture by touching the screen with just one finger. All you need to do is double tap, but keeping your finger on the screen on the second tap and drag up or down (demo).
In the videos below you can check out the behavior on both platforms. I wish I had used the same app to demonstrate, as Apple Maps uses the pinch interaction differently, so please ignore this difference in the videos.
If you test with the same target component, you'll see that the behavior is the same. The difference is that on iOS you drag up to zoom in while on Android you need to drag down.
android-single-touch-pinch-simulation.mp4
ios-single-touch-pinch-simulation.mp4
How to implement
Since we have the tapOn and swipe commands, I tried to use them to simulate the pinch gesture, but was unsuccessful. Also, I tried to change the
tapOn
propertywaitToSettleTimeoutMs
to0 ms
to decrease the time between the two commands but again, without success. The time between commands is not short enough.So the proposal is very simple: Create a new command that executes tapOn and swipe inner behavior in sequence
I haven't delved into how they work internally, but I see a great possibility that if they are run in sequence with a very short time between them, this could be possible.
Is this proposal viable?
Thanks
Anything else?
No response
The text was updated successfully, but these errors were encountered: