Appium API endpoints

274 views
Skip to first unread message

Daniel Puterman

unread,
Sep 1, 2013, 6:06:50 PM9/1/13
to appium-...@googlegroups.com
Hi, 

In the Appium wiki page (https://github.com/appium/appium/wiki/Automating-mobile-gestures) the following endpoints are mentioned:

  1. session/:sessionId/touch/tap
  2. session:/sessionId/touch/flick_precise
  3. session:/sessionId/touch/swipe

However, when using TouchActions of the newest Java bindings of WebDriver (2.35):

  1. A call to "singleTap", calls  /touch/click (i.e., not "tap"). Which, in my application at least, causes the Appium server to output an error and drop the client without notifying it, so the client just hangs.
  2. A call to "flick", calls /touch/flick (instead of "flick_precis"), which works fine.

Which is endpoints are correct? The documnentation or the java bindings?

Thanks,
Daniel

Jonathan Lipps

unread,
Sep 3, 2013, 2:30:00 PM9/3/13
to Daniel Puterman, appium-...@googlegroups.com
However, when using TouchActions of the newest Java bindings of WebDriver (2.35):
  1. A call to "singleTap", calls  /touch/click (i.e., not "tap"). Which, in my application at least, causes the Appium server to output an error and drop the client without notifying it, so the client just hangs.
Daniel, what is the error output you see from Appium here?

  1. A call to "flick", calls /touch/flick (instead of "flick_precis"), which works fine.
flick_precise is called when you run the "mobile: flick" command, which allows for a different combination of parameters than the regular flick. If regular flick is working for you, then go with that.

Daniel Puterman

unread,
Sep 8, 2013, 7:45:50 AM9/8/13
to appium-...@googlegroups.com
Hi Jonathan, thanks for the reply. Here's the error output (I'm also attached the previous command's output at the begining, just to show that the element which I'm trying to tap on had been found correctly):

debug: Appium request initiated at /wd/hub/session/2164d759-5e1b-4bf3-af76-8427e3a203a5/element
debug: Request received with params: {"using":"name","value":"Button"}
info: Pushing command to appium work queue: ["find",{"strategy":"name","selector":"Button","context":"","multiple":false}]
info: [ADB] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Button","context":"","multiple":false}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Button","context":"","multiple":false}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: find
info: [ANDROID] [debug] Finding Button using NAME with the contextId:
info: [ANDROID] [info] Returning result: {"value":{"ELEMENT":"1"},"status":0}
info: [ADB] Received command result from bootstrapinfo: Responding to client with success: {"status":0,"value":{"ELEMENT":"1"},"sessionId":"2164d759-5e1b-4bf3-af76-8427e3a203a5"}
POST /wd/hub/session/2164d759-5e1b-4bf3-af76-8427e3a203a5/element 200 180ms - 109

debug: Appium request initiated at /wd/hub/session/2164d759-5e1b-4bf3-af76-8427e3a203a5/touch/click
debug: Request received with params: {"element":"1"}
info: Pushing command to appium work queue: ["element:click",{}]
info: [ADB] Sending command to android: {"cmd":"action","action":"element:click","params":{}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"element:click","params":{}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: click
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] Error in testRunServer:
info: [ADB STDOUT] java.lang.NullPointerException
info: [ADB STDOUT] at java.util.Hashtable.get(Hashtable.java:263)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidElementsHash.getElement(AndroidElementsHash.java:63)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidCommand.getElement(AndroidCommand.java:61)
info: [ADB STDOUT] at io.appium.android.bootstrap.handler.Click.execute(Click.java:41)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidCommandExecutor.execute(AndroidCommandExecutor.java:67)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.runCommand(SocketServer.java:183)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.handleClientData(SocketServer.java:91)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.listenForever(SocketServer.java:134)
info: [ADB STDOUT] at io.appium.android.bootstrap.Bootstrap.testRunServer(Bootstrap.java:17)
info: [ADB STDOUT] at java.lang.reflect.Method.invokeNative(Native Method)
info: [ADB STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:144)
info: [ADB STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:87)
info: [ADB STDOUT] at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:90)
info: [ADB STDOUT] at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
info: [ADB STDOUT] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
info: [ADB STDOUT] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
info: [ADB STDOUT] at dalvik.system.NativeStart.main(Native Method)
info: [ADB STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stack=java.lang.NullPointerException
info: [ADB STDOUT] at java.util.Hashtable.get(Hashtable.java:263)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidElementsHash.getElement(AndroidElementsHash.java:63)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidCommand.getElement(AndroidCommand.java:61)
info: [ADB STDOUT] at io.appium.android.bootstrap.handler.Click.execute(Click.java:41)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidCommandExecutor.execute(AndroidCommandExecutor.java:67)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.runCommand(SocketServer.java:183)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.handleClientData(SocketServer.java:91)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.listenForever(SocketServer.java:134)
info: [ADB STDOUT] at io.appium.android.bootstrap.Bootstrap.testRunServer(Bootstrap.java:17)
info: [ADB STDOUT] at java.lang.reflect.Method.invokeNative(Native Method)
info: [ADB STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:144)
info: [ADB STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:87)
info: [ADB STDOUT] at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:90)
info: [ADB STDOUT] at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
info: [ADB STDOUT] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
info: [ADB STDOUT] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
info: [ADB STDOUT] at dalvik.system.NativeStart.main(Native Method)
info: [ADB STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] Test results for WatcherResultPrinter=.E
info: [ADB STDOUT] Time: 9.093
info: [ADB STDOUT] FAILURES!!!
info: [ADB STDOUT] Tests run: 1,  Failures: 0,  Errors: 1
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [ADB] Uninstalling app com.applitools.longapp


Thanks,
Daniel

Jonathan Lipps

unread,
Sep 9, 2013, 1:19:26 PM9/9/13
to Daniel Puterman, appium-...@googlegroups.com
Yep, this was a bug. Fixed when https://github.com/appium/appium/pull/1127 is merged

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages