Hello!
since latest update to Appium 1.3.4.1 for Windows I am no longer able to perform a swipe action, the same code worked just fine in the previous version, so I assume this to be a bug?
see details below:
Platform: Android (both Kit Kat and Jelly Bean)
Running from: Windows
Binding Language: C#
Swipe code snippet:
public static void Swipe(double x1, double y1, double x2, double y2)
{
var t = new TouchAction(_driver);
t.Press(x1, y1).MoveTo(x2, y2).Release().Perform();
}
error given by C# console is:
Unexpected error. ERROR running Appium command: Cannot read property ‘element’ of undefined
Appium sever error log:
info: → POST /wd/hub/session/dfca7a3c-3b71-41b3-92a7-9480340e86b3/touch/perform {“actions”:[{“action”:“press”,“options”:{“x”:130,“y”:814}},{“action”:“moveTo”,“options”:{“x”:130,“y”:814}},{“action”:“release”}]}
TypeError: Cannot read property ‘element’ of undefined
at null. (C:\AppiumForWindows\Appium\node_modules\appium\lib\devices\android\android-controller.js:901:26)
at androidController.performTouch (C:\AppiumForWindows\Appium\node_modules\appium\lib\devices\android\android-controller.js:985:5)
at Object.exports.performTouch [as handle] (C:\AppiumForWindows\Appium\node_modules\appium\lib\server\controller.js:331:14)
at next_layer (C:\AppiumForWindows\Appium\node_modules\appium\node_modules\express\lib\router\route.js:113:13)
at Route.dispatch (C:\AppiumForWindows\Appium\node_modules\appium\node_modules\express\lib\router\route.js:117:5)
at C:\AppiumForWindows\Appium\node_modules\appium\node_modules\express\lib\router\index.js:222:24
at param (C:\AppiumForWindows\Appium\node_modules\appium\node_modules\express\lib\router\index.js:307:14)
at param (C:\AppiumForWindows\Appium\node_modules\appium\node_modules\express\lib\router\index.js:323:14)
at Function.proto.process_params (C:\AppiumForWindows\Appium\node_modules\appium\node_modules\express\lib\router\index.js:367:3)
at next (C:\AppiumForWindows\Appium\node_modules\appium\node_modules\express\lib\router\index.js:216:19)
info: ← POST /wd/hub/session/dfca7a3c-3b71-41b3-92a7-9480340e86b3/touch/perform 500 3.417 ms - 97