Appium 1.5.3 iosDriver.swipe doesn't work anymore !?

I’m used to swipe from right to left on iOS with this code:

Dimension size = appiumDriver.manage().window().getSize();
int startx = (int) (size.width * 0.8);
int endx = (int) (size.width * 0.20);
int starty = size.height / 2;
appiumDriver.swipe(startx, starty, endx, starty, 500);

It’s supposed to swipe from right to left, and it worked just fine before (I have a CI for this). But now it doesn’t work anymore, and I see that when I run the test on real device, it swipes from left to right! I tried to switch “direction” between swipe left and right, but it always swipes from left to right.

Does anyone know if the swipe method is not supported anymore? And if there is any solutions? Thanks


appiumDriver.swipe(startx, starty, -endx, starty, 500);

Thanks for the reply. I tried, and it actually swiped from right to left, but not a full swipe, it just swiped the screen a little bit. I also tried to increase the delay time, but nothing worked

then just:

appiumDriver.swipe(startx, starty, -(startx - 20), starty, 500);

Thank you very much @Aleksei, this does the work, you saved my days.

Just one question: why with the same code, it worked before and now it doesn’t work anymore? Is there any explanation.
My test device is iPhone 5c, iOS 8.4.1.

it were problems on java-client side. one time it was swipe with absolute coordinates another time with relative. even do not remember what are now :slight_smile: . i just see in appium server logs what happens really and change appropriately.