Skip to content

Cannot perform "tap" #172

Closed
Closed

Description

@igalep

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 ?)

Activity

  1. Jonahss commented on Mar 19, 2015

    @Jonahss
    Member

    Hmm, what is the inspectors Precise Tap option?

  2. imurchie commented on Mar 19, 2015

    @imurchie
    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.

  3. igalep commented on Mar 22, 2015

    @igalep
    Author

    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);

  4. TikhomirovSergey commented on Mar 7, 2016

    @TikhomirovSergey
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions