Afrin Afrin - 2 years ago 142
Java Question

appium long press and than move element(drag and drop) is not working

I have a scenario to test an IOS app like this:

  1. long press on an element.

  2. move that element to desired location.

I am using the following code:

TouchAction action = new TouchAction(driver)

but its not working for me. Need any good suggestion.

Answer Source

i was in trouble also about this. But i solved this like below:

TouchAction action = new TouchAction(driver);

waitAction will wait to complete longPress action than moveTo action will perform.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download