TouchAction is concatenating coordinates

I’m attempting to automate a touch action which requires multiple steps within the same touch action. However it appears Appium is concatenating the coordinates I provide throughout each step of the touch. I’m using Appium 1.3.4 and testing on iOS. I’m using I’m using the iOS Selenium driver but with my own TouchAction implementation.

The iOS client side code looks like:

SETouchAction *action = [[SETouchAction alloc] init];
[action longPressAtX:123 y:98];
[action moveToX:456 y:76];
[action moveToX:321 y:45];
[driver performTouchAction:action];

The debug logs are:

info: --> POST /wd/hub/session/e6ec94af-67f9-4573-85cb-7b26181d5253/touch/perform {"actions":[{"options":{"x":"123","y":"98"},"action":"longPress"},{"options":{"x":"456","y":"76"},"action":"moveTo"},{"options":{"x":"321","y":"45"},"action":"moveTo"}]}
info: [debug] Pushing command to appium work queue: "target.touch([{\"touch\":[{\"x\":\"123\",\"y\":\"98\"}],\"time\":0.2},{\"touch\":[{\"x\":\"456123\",\"y\":\"7698\"}],\"time\":0.4},{\"touch\":[{\"x\":\"321456123\",\"y\":\"457698\"}],\"time\":0.6000000000000001}])"
info: [debug] Sending command to instruments: target.touch([{"touch":[{"x":"123","y":"98"}],"time":0.2},{"touch":[{"x":"456123","y":"7698"}],"time":0.4},{"touch":[{"x":"321456123","y":"457698"}],"time":0.6000000000000001}])
info: [debug] [INST STDERR] 2015-01-08 14:19:52.788 ScriptAgent[79272:2a0f] Log written to /Users/mark/Library/Developer/CoreSimulator/Devices/9063BA05-841B-441C-ACCD-83ADD3A2A73C/data/Library/Logs/CrashReporter/UIALogs/ScriptError-2015-01-08-141952.plist
info: [debug] [INST] 2015-01-08 03:19:52 +0000 Debug: Got new command 21 from instruments: target.touch([{"touch":[{"x":"123","y":"98"}],"time":0.2},{"touch":[{"x":"456123","y":"7698"}],"time":0.4},{"touch":[{"x":"321456123","y":"457698"}],"time":0.6000000000000001}])
info: [debug] [INST] 2015-01-08 03:19:52 +0000 Debug: evaluating target.touch([{"touch":[{"x":"123","y":"98"}],"time":0.2},{"touch":[{"x":"456123","y":"7698"}],"time":0.4},{"touch":[{"x":"321456123","y":"457698"}],"time":0.6000000000000001}])
info: [debug] [INST] 2015-01-08 03:19:52 +0000 Debug: target.touch(__NSCFArray)
info: [debug] [INST] 2015-01-08 03:19:52 +0000 Debug: point is not within the bounds of the screen
info: [debug] Socket data received (70 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {"status":17,"value":"point is not within the bounds of the screen"}
info: [debug] Responding to client with error: {"status":17,"value":{"message":"An error occurred while executing user supplied JavaScript.","origValue":"point is not within the bounds of the screen"},"sessionId":"e6ec94af-67f9-4573-85cb-7b26181d5253"}
info: <-- POST /wd/hub/session/e6ec94af-67f9-4573-85cb-7b26181d5253/touch/perform 500 1058.775 ms - 205 
info: [debug] [INST] 2015-01-08 03:19:52 +0000 Error: VerboseError: point is not within the bounds of the screen
info: [debug] [INST] 2015-01-08 03:19:52 +0000 Error: Error during eval: touch@[native code]
       eval code
eval@[native code]
startProcessing@file:///usr/local/lib/node_modules/appium/CB912F05-0DD6-4B31-8859-23E7F520812A/bootstrap-2e6b83239819fb8c.js:2663:30
bootstrap@file:///usr/local/lib/node_modules/appium/CB912F05-0DD6-4B31-8859-23E7F520812A/bootstrap-2e6b83239819fb8c.js:2729:31
global code@file:///usr/local/lib/node_modules/appium/CB912F05-0DD6-4B31-8859-23E7F520812A/bootstrap-2e6b83239819fb8c.js:2738:10
info: [debug] [INST] 2015-01-08 03:19:52 +0000 Debug: responding with:
info: [debug] [INST] 2015-01-08 03:19:52 +0000 Debug: Running system command #22: /usr/local/Cellar/node/0.10.34/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":17,"value":"point is not within the bounds of the screen"}...

Are the parameters sent to /wd/hub/session/e6ec94af-67f9-4573-85cb-7b26181d5253/touch/perform correct?
If so, it appears Appium is concatenating the coordinates so that by the third command the coordinates are {“x”:“321456123”,“y”:“457698”} rather than {“x”:“321”,“y”:“45”}

Thanks

The touch actions are kind of confusing. I recommend reposting this problem on the issue tracker.

I don’t know if this is a bug or a feature.