Apple broke this about a year ago for the simulators, I would not wait for them to fix this.
I’ve heard that this works for real devices but I’ve been unable to make it work.
Apple broke this about a year ago for the simulators, I would not wait for them to fix this.
I’ve heard that this works for real devices but I’ve been unable to make it work.
I don’t have any problem using swipe with real ios7 devices.
either with the deprecated execute_script ‘mobile: swipe’,… or with TouchAction
def swipe_left
action = Appium::TouchAction.new
action.swipe start_x: 300, end_x: 75, start_y: 500, end_y: 500, duration: 800
action.perform
end
this is working perfectly fine in iOS
@deepukjayan Does this work on simulator or on real device? I have never been able to get the swipe gesture working on simulator and a lot of folks here are facing the same issue
Yes this works perfectly in my device. I haven’t tested in simulator. I assume it will work in simulator also.
My Device spec : iPhone 6 plus iOS 8.3
Then I think it makes sense because the swipe gesture is broken only for simulator. I was able to do a swipe action on real device but not on simulator even with the same app and same script.
I’ve tried using swipe on real devices and simulator - cannot get them to work at all. Any news about this issue? Or maybe ideas/suggestions? I really need to swipe to refresh…
not on a UIATableView
Hi guys,
I am super excited to say that swipe gesture is finally working on simulator with Xcode 7.
I have tested it with Appium V1.4.11 + Xcode 7 with a tiny hope that it will work, and it does works!
So no more Apple scripts, no more Robot framework and all kind of stuff for workaround
Enjoy!
@tbao What command are you using?
Also do you know if it only works on the iOS9 sim? Right now the app I’m working on needs iOS8 support so I’m using that sim.
@sheady As far as I can see, the swipe gesture is working only for ios 9. But I am not 100% sure because maybe I configure something wrong for ios8
I use this command in Java: driver.swipe(int startx, int starty, int endx, int endy, int duration)
@tbao thanks, I’m in ruby and found a way that works on the iOS8 sim with Xcode7 installed. For whatever reason the code doesn’t work in the Appium Ruby Console.
Appium::TouchAction.new.swipe(start_x: 0, start_y: 300, end_x: 100, end_y: 300, duration: 500).perform
I am using java client 3.2.0.
But I believe it should work for the older versions because the core problem is the simulator. And it is fixed with xcode 7 release
I posted some code in this thread relating to using ITouchActions to scroll in C#. Can you see if this method works for java?
I used https://github.com/vicwomg/swipeInWindow.py in my Java code like this:
ProcessBuilder processBuilder = new ProcessBuilder(
“python”,
“/Users/sgarg/Documents/xebia/tribune/code/xebiacode/Tribune/src/main/java/testDriver/swipeInWindow.py”,
“iOS Simulator”, “0.5”, “0.9”, “0.5”, “0.3”);
processBuilder.start();
Swipe works as expected on Appium 1.4.13 and iOS9 ( Java binding)
This is for Swipe from Bottom to Top:
((AppiumDriver) driver).context(“NATIVE_APP”);
size = driver.manage().window().getSize();
startX = size.width / 2;
startY = (int) (size.height * 0.80);
endY = (int) (size.height * 0.40);
((AppiumDriver) driver).swipe(startX, startY, startX, endY,1000);