Swipe keyword not working on a real device (iOS 10) and Appium 1.6.4-beta

Hi,

I’m using Robot Framework on Python 2.7.13 with AppiumLibrary to run tests on a real device with iOS 10.2.1

When trying to run swipe keyword on a RF test the result is not what I expected. Here’s the command:
Swipe 200 600 200 100 2

And what Appium sends to the device:
[HTTP] --> POST /wd/hub/session/fc821095-94b8-4df8-b90b-757ba03692cf/touch/perform {"sessionId":"fc821095-94b8-4df8-b90b-757ba03692cf","actions":[{"action":"press","options":{"y":"600","x":"200"}},{"action":"wait","options":{"ms":"2"}},{"action":"moveTo","options":{"y":"100","x":"200"}},{"action":"release","options":{}}]} [debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{"action":"press","options":{"y":"600","x":"200"}},{"action":"wait","options":{"ms":"2"}},{"action":"moveTo","options":{"y":"100","x":"200"}},{"action":"release","options":{}}],"fc821095-94b8-4df8-b90b-757ba03692cf"] [debug] [XCUITest] Executing command 'performTouch' [debug] [XCUITest] Received the following touch action: press-wait-moveTo-release [debug] [JSONWP Proxy] Proxying [POST /wda/element/0/dragfromtoforduration] to [POST http://localhost:8100/session/02B4BCD9-BC91-4B62-864F-CDF015C73524/wda/element/0/dragfromtoforduration] with body: {"fromX":"200","fromY":"600","toX":"200200","toY":"600100","duration":0.002}

With the result of swipe not being performed on the device (“toX”:“200200”,“toY”:“600100”). And then it hangs after a while.

Has anyone experienced this behavior?

Thanks.

200200 and 600100 are off the screen bounds

Thanks Ken, yes, they are off the screen bounds. The problem is Appium sending those values to the device when they should be 200 and 100. It seems they are concatenated with the origin values, as you can see in the keyword:

Swipe 200 600 200 100 2

Do you happen to know a workaround to this?

I’m not seeing it, and I’m doing swipes. Am not using the robot framework though
my exact version of appium is
[Appium] Welcome to Appium v1.6.4-beta (REV 3469f177f043b163e0c362b0fa10f9f99c31114b)

interestingly though my appium logs show a different endpoint than yours:
[debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“press”,“options”:{“y”:100,“x”:100}},{“action”:“wait”,“options”:{“ms”:1}},{“action”:“moveTo”,“options”:{“y”:500,“x”:500}},{“action”:“release”,“options”:{}}],“c8b1f21c-1216-46c6-88a0-226c54445c54”]
[debug] [XCUITest] Executing command ‘performTouch’
[debug] [XCUITest] Received the following touch action: press-wait-moveTo-release
[debug] [JSONWP Proxy] Proxying [POST /wda/dragfromtoforduration] to [POST http://localhost:8100/session/1B0935E4-66A7-43A1-BF8C-02CC83450312/wda/dragfromtoforduration] with body: {“fromX”:100,“fromY”:100,“toX”:600,“toY”:600,“duration”:0.001}

vs your POST /wda/element/0/dragfromtoforduration

Thanks Ken, I upgraded to 1.6.4-beta.2 where the endpoint looked exactly as yours, but the results are the same:

[debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“press”,“options”:{“y”:“800”,“x”:“200”}},{“action”:“wait”,“options”:{“ms”:“2000”}},{“action”:“moveTo”,“options”:{“y”:“100”,“x”:“200”}},{“action”:“release”,“options”:{}}],“77c76ea8-74fb-47cc-8c1a-286a72fae7b5”]
[debug] [XCUITest] Executing command ‘performTouch’
[debug] [XCUITest] Received the following touch action: press(options={“y”:“800”,“x”:“200”})-wait(options={“ms”:“2000”})-moveTo(options={“y”:“100”,“x”:“200”})-release(options={})
[debug] [XCUITest] Found matching gesture: drag
[debug] [JSONWP Proxy] Proxying [POST /wda/dragfromtoforduration] to [POST http://localhost:8100/session/8A953803-DC86-4714-8E56-DDE434D9264A/wda/dragfromtoforduration] with body: {“fromX”:“200”,“fromY”:“800”,“toX”:“200200”,“toY”:“800100”,“duration”:2}

The issue is when moveTo calculates the offset.