Double tap in IOS Simulator Not working

我与影子孤独终老i 提交于 2019-12-10 22:07:04

问题


I am trying to double tap an element in IOS Simulator using appium but unable to do so.

Methods tried:

action.tap(x=xx, y=yy, count=1).release().perform() 

2 times in a row,but it seems there is a 2 second gap which in real world would not be a double tap

element.click 

same problem as above

action.press(x=xx, y=yy).wait(500).release().perform().press(x=0, y=0).wait(500).perform() 

no result

action.tap(x=xx, y=yy, count=2).release().perform()

no result.

Is there any thing else i can try or any other method which works on ios.


回答1:


I call it in a similar way the first method you listed, its not as fast as double tap, but its less than one second delay Appium::TouchAction.new.tap(x: xx, y: yy, count: 2).perform

.tap dont need to use release, only .press need it




回答2:


You should do both of the press commands before calling perform():

action.press(x=xx, y=yy).release().wait(500).press(x=xx, y=yy).release().perform()


来源:https://stackoverflow.com/questions/38791731/double-tap-in-ios-simulator-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!