[Resolved] tapCount = 2 not working (ios7 real device)

Hi,

any reason why this command is performing a single tap:

execute_script 'mobile: tap', :x => 0.5, :y => 0.65, :tapCount => 2

Any alternatives for double tap ?

Appium logs on command above:

info: --> POST /wd/hub/session/cb39081a-d7ef-4bd1-8888-f28c29ab7d3a/execute {"script":"mobile: tap","args":[{"x":0.5,"y":0.65,"tapCount":2}]}
info: [debug] Pushing command to appium work queue: "au.complexTap({\"tapCount\":2,\"touchCount\":1,\"duration\":0.1,\"x\":0.5,\"y\":0.65})"
info: [debug] Sending command to instruments: au.complexTap({"tapCount":2,"touchCount":1,"duration":0.1,"x":0.5,"y":0.65})
info: [debug] [INST] 2014-11-07 11:28:55 +0000 Debug: Got new command 40 from instruments: au.complexTap({"tapCount":2,"touchCount":1,"duration":0.1,"x":0.5,"y":0.65})
info: [debug] [INST] 2014-11-07 11:28:55 +0000 Debug: evaluating au.complexTap({"tapCount":2,"touchCount":1,"duration":0.1,"x":0.5,"y":0.65})
info: [debug] [INST] 2014-11-07 11:28:55 +0000 Debug: target.tapWithOptions({x:"160", y:"369.2"}, {touchCount:"1", duration:"0.1", tapCount:"2"})
info: [debug] [INST] 2014-11-07 11:28:55 +0000 Debug: evaluation finished
info: [debug] [INST] 2014-11-07 11:28:55 +0000 Debug: responding with:
info: [debug] [INST] 2014-11-07 11:28:55 +0000 Debug: Running system command #41: /usr/local/Cellar/node/0.10.31/bin/node /usr/local/avm/versions/1.3.1/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":""}...

Apparently even if I wanted to double click on an element (witch I dont, I want to double click in coordinates) its not working:

driver.action.double_click(element).perform

results in

post /doubleclick
Selenium::WebDriver::Error::UnknownError: Not yet implemented. Please help us: http://appium.io/get-involved.html
from /Users/wcs_mac/.rvm/gems/ruby-2.1.2/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok'

I’m sure someone has used double tap before, no?

Finally was able to do it with

Appium::TouchAction.new.tap(:x => 160, :y => 369, :fingers => 2).perform

@Telmo_Cardoso: any idea, how this code will look in java if i want to do 5 times single figure tap ?

  • is it a script has to be invoked via javascript executor?
    I’m using appium-1.3.4 and javaclient- 2.1.0
    will this be fine - new TouchAction(driver).Tap(point.X, point.Y, count: 5).Perform();

no idea, sorry! In java API (http://appium.github.io/java-client/io/appium/java_client/TouchAction.html) cant see anything similar to fingers in ruby (http://www.rubydoc.info/github/appium/ruby_lib/master/Appium/TouchAction).

If you cant find it, I guess you have to open a request in githut to add it. Doesn’t make much sense that we can do it in ruby and not in java