Are gestures in ios possible?

I am veteran of two days with Appium. Thanks for this powerful software.

My question. Is it possible to do gestures on iOS with Appium?

I have tried to generalise swipe when I saw code like this generated by Appium Desktop

  await (new wd.TouchAction(driver))
    .press({x: 831, y: 283})
    .moveTo({x: 623, y: 281})
    .release()
    .perform()

That is touch/move/release. Since a gesture is similar, but touch, move, move,…,move,release I tried:

    await (new wd.TouchAction(driver))
    .press({x: 518, y: 205})
    .moveTo({x: 682, y: 211})
    .moveTo({x: 625, y: 410})
    .moveTo({x: 449, y: 475})
    .moveTo({x: 381, y: 180})
    .moveTo({x: 737, y: 180})
    .release()
    .perform()

This is a lasso select in our App, but seems to have no effect on Appium. Am I barking up the wrong tree? Is this even possible?

switch to actions where you control also moving speed -> http://appium.io/docs/en/commands/interactions/actions/

1 Like

Yes, thank you.

Did it like this…

    var actions = new wd.W3CActions(driver);
    var touchInput = actions.addTouchInput();
    touchInput.pointerMove({duration: 100, x: 518, y: 205});
    touchInput.pointerDown({button: 0});
    touchInput.pause({duration: 200});
    touchInput.pointerMove({duration: 100, x: 682, y: 205});
    touchInput.pause({duration: 200});
    touchInput.pointerMove({duration: 100, x: 682, y: 410});
    touchInput.pause({duration: 200});
    touchInput.pointerMove({duration: 100, x: 449, y: 410});
    touchInput.pause({duration: 200});
    touchInput.pointerMove({duration: 100, x: 449, y: 410});
    touchInput.pause({duration: 200});
    touchInput.pointerMove({duration: 100, x: 449, y: 180});
    touchInput.pause({duration: 200});
    touchInput.pointerMove({duration: 100, x: 500, y: 180});
    touchInput.pause({duration: 200});
    touchInput.pointerMove({duration: 1000, origin: 'pointer', x: -50, y: 205});
    touchInput.pointerUp({button: 0});
    await actions.perform();