3

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.

vks
  • 67,027
  • 10
  • 91
  • 124
  • @Domestus any inputs????????? – vks Aug 05 '16 at 14:32
  • I call 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 release, only press need it – juhlila Aug 05 '16 at 14:33
  • @juhlila u call `tap` 2 times?on real device or simulator? i am on simulator and in logs it shows 2 seconds gap!!! – vks Aug 05 '16 at 14:35
  • I use it on real devices, never tried on simulator – juhlila Aug 05 '16 at 14:37
  • @juhlila can you try on simulator and see if it works for you....there 50 bounty on offer :) – vks Aug 08 '16 at 19:19
  • try this method like: yourdriver.tap(2, elem, 400) ... i think this would work. this method is not action method. – noor Aug 09 '16 at 15:36
  • @juhlila it worked.... post your suggestion as answer...i will reward it bounty – vks Aug 09 '16 at 16:54
  • good to help @vks, i posted it as an answer ;) – juhlila Aug 09 '16 at 18:31

2 Answers2

1

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()
Lasse
  • 880
  • 5
  • 11
  • I tried this and many other variants...somehow its not working on ios simulator :( – vks Aug 05 '16 at 19:47
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

juhlila
  • 1,114
  • 1
  • 10
  • 16