Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot perform "tap" #172

Closed
igalep opened this issue Mar 19, 2015 · 4 comments
Closed

Cannot perform "tap" #172

igalep opened this issue Mar 19, 2015 · 4 comments

Comments

@igalep
Copy link

igalep commented Mar 19, 2015

Hi ,
I'm trying to perform a tap and it's doesn't work for me.
using java_client 2.1.0
IOS 8.1 (simulaor)

the log is :

info: [debug] Got result from instruments: {"status":0,"value":{"origin":{"x":25,"y":443},"size":{"width":94,"height":25}}}
info: [debug] Pushing command to appium work queue: "target.touch([{\"touch\":[{\"x\":72,\"y\":455.5}],\"time\":0.2},{\"touch\":[{\"x\":72,\"y\":455.5}],\"time\":3.2}])"
info: [debug] Sending command to instruments: target.touch([{"touch":[{"x":72,"y":455.5}],"time":0.2},{"touch":[{"x":72,"y":455.5}],"time":3.2}])
info: [debug] [INST] 2015-03-19 09:40:23 +0000 Debug: Got new command 5 from instruments: target.touch([{"touch":[{"x":72,"y":455.5}],"time":0.2},{"touch":[{"x":72,"y":455.5}],"time":3.2}])

info: [debug] [INST] 2015-03-19 09:40:23 +0000 Debug: evaluating target.touch([{"touch":[{"x":72,"y":455.5}],"time":0.2},{"touch":[{"x":72,"y":455.5}],"time":3.2}])
info: [debug] [INST] 2015-03-19 09:40:23 +0000 Debug: target.touch(__NSCFArray)

but if I'm using the inspector's Precise tap oprion it does work , and the log is :

info: --> POST /wd/hub/session/c735b07e-4ff5-4766-a45e-8cd069e89d8b/execute {"script":"mobile: tap","args":[{"y":112,"touchCount":1,"x":86,"tapCount":1,"duration":0.6}]}

info: [debug] Pushing command to appium work queue: "au.complexTap({\"tapCount\":1,\"touchCount\":1,\"duration\":0.6,\"x\":86,\"y\":112})"
info: [debug] Sending command to instruments: au.complexTap({"tapCount":1,"touchCount":1,"duration":0.6,"x":86,"y":112})
info: [debug] [INST] 2015-03-19 09:42:57 +0000 Debug: Got new command 34 from instruments: au.complexTap({"tapCount":1,"touchCount":1,"duration":0.6,"x":86,"y":112})
info: [debug] [INST] 2015-03-19 09:42:57 +0000 Debug: evaluating au.complexTap({"tapCount":1,"touchCount":1,"duration":0.6,"x":86,"y":112})
info: [debug] [INST] 2015-03-19 09:42:57 +0000 Debug: target.tapWithOptions({x:"86", y:"112"}, {touchCount:"1", tapCount:"1", duration:"0.6"})
info: [debug] [INST] 2015-03-19 09:42:58 +0000 Debug: evaluation finished

Any idea why it doesn't work ? (Appium's bug ?)

@Jonahss
Copy link
Member

Jonahss commented Mar 19, 2015

Hmm, what is the inspectors Precise Tap option?

@imurchie
Copy link
Contributor

Can you provide slightly more of the log for the first case? We need the information about the commands coming in (from info: --> ... to info: <-- ...). The client-side commands would be useful, too.

@igalep
Copy link
Author

igalep commented Mar 22, 2015

The log file :

info: --> POST /wd/hub/session/d6afbcc5-e175-41c3-8fc4-6a4c580b8cbc/touch/perform {"actions":[{"action":"press","options":{"element":"0"}},{"action":"wait","options":{"ms":3000}},{"action":"release","options":{}}]}
info: [debug] Pushing command to appium work queue: "au.getElement('0').rect()"
info: [debug] Sending command to instruments: au.getElement('0').rect()
info: [debug] [INST] 2015-03-22 15:18:32 +0000 Debug: Got new command 4 from instruments: au.getElement('0').rect()

info: [debug] [INST] 2015-03-22 15:18:32 +0000 Debug: evaluating au.getElement('0').rect()
info: [debug] [INST] 2015-03-22 15:18:32 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-03-22 15:18:32 +0000 Debug: responding with:
info: [debug] [INST] 2015-03-22 15:18:32 +0000 Debug: Running system command #5: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":{"origin":{"x":25,"y":443},"size":{"width":94,"height":25}}}...

info: [debug] Socket data received (82 bytes)

info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {"status":0,"value":{"origin":{"x":25,"y":443},"size":{"width":94,"height":25}}}
info: [debug] Pushing command to appium work queue: "target.touch([{"touch":[{"x":72,"y":455.5}],"time":0.2},{"touch":[{"x":72,"y":455.5}],"time":3.2}])"
info: [debug] Sending command to instruments: target.touch([{"touch":[{"x":72,"y":455.5}],"time":0.2},{"touch":[{"x":72,"y":455.5}],"time":3.2}])

info: [debug] [INST] 2015-03-22 15:18:33 +0000 Debug: Got new command 5 from instruments: target.touch([{"touch":[{"x":72,"y":455.5}],"time":0.2},{"touch":[{"x":72,"y":455.5}],"time":3.2}])

info: [debug] [INST] 2015-03-22 15:18:33 +0000 Debug: evaluating target.touch([{"touch":[{"x":72,"y":455.5}],"time":0.2},{"touch":[{"x":72,"y":455.5}],"time":3.2}])
info: [debug] [INST] 2015-03-22 15:18:33 +0000 Debug: target.touch(__NSCFArray)
info: [debug] [INST] 2015-03-22 15:18:36 +0000 Debug: evaluation finished

the client side command is simple :)

MobileElement element = MobileElementsOperations.getElementByName(driver, currencyPair);
driver.tap(1, element, 3000);

@TikhomirovSergey
Copy link
Contributor

@igalep
If this issue is here still please open a new one. Please try to format the new ticket like this template: https://github.com/appium/java-client/blob/master/ISSUE_TEMPLATE.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants