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.
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:
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}