Java – appium long press and move elements (drag and drop) do not work

I have a solution to test such IOS applications:

I use the following code:

TouchAction action = new TouchAction(driver)
action.long_press(element1).move_to(element2).wait(500).release().perform()

But it doesn't suit me Need any good advice

Solution

I'm in trouble, too But I solved this problem as follows:

TouchAction action = new TouchAction(driver);
action.longPress(elem1).waitAction(3000).moveTo(elem2).perform().release();

Waitaction will wait for the longpress operation to complete instead of the moveto operation

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>