How to do automate "Pull to refresh" gesture in iOS

2,099 views
Skip to first unread message

Amit Rawat

unread,
Apr 29, 2013, 7:03:26 AM4/29/13
to appium-...@googlegroups.com
I am automating an app which has a list view and we need to do "Pull to refresh" to refresh the items in the list view. Is it possible to automate this gesture using Java?

Thanks,
Amit.

Satyajit Malugu

unread,
Apr 29, 2013, 12:43:29 PM4/29/13
to appium-...@googlegroups.com
Did you look at mobile:swipe, Make sure have proper x and y coordinates and look at this  - https://groups.google.com/forum/?fromgroups=#!searchin/appium-discuss/swipe/appium-discuss/uJdd4Cadpf8/0dNZtiHVX5wJ

Jonathan Lipps

unread,
Apr 29, 2013, 1:44:42 PM4/29/13
to Amit Rawat, appium-...@googlegroups.com
I would try a slow downward swipe, using "mobile: swipe"


--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Amit Rawat

unread,
Apr 29, 2013, 2:14:21 PM4/29/13
to Jonathan Lipps, appium-...@googlegroups.com
Thanks Jonathan and Satyajit. I will surely try this and will share my experience.
--
Thanks,
Amit Rawat.

Unmesh Gundecha

unread,
Mar 22, 2014, 12:35:54 PM3/22/14
to appium-...@googlegroups.com, Jonathan Lipps, am...@mycityway.com
Hello,

I have a similar situation where I need to check the "pull to refresh" gesture in iOS app (currently running on Appium 0.17.6 and iOS 7.1). As "mobile: swipe" is not supported in iOS7, is there any other alternative?
Played with drag, scroll, but no luck.

Thanks,
Unmesh

raja sekar

unread,
Mar 22, 2014, 6:00:39 PM3/22/14
to appium-...@googlegroups.com, Jonathan Lipps, am...@mycityway.com
I'm also on the same boat. Pull to refresh doesn't work with swipe. I would really appreciate if some one can share a code sample that works.

Logrologist

unread,
May 13, 2014, 12:37:05 AM5/13/14
to appium-...@googlegroups.com, Jonathan Lipps, am...@mycityway.com
Did you have any luck with this?  I'm trying to figure this out as well, and would like to bump this thread in general.  Anyone figure out a decent working example?

myjmht...@gmail.com

unread,
Aug 21, 2014, 2:05:59 PM8/21/14
to appium-...@googlegroups.com, am...@mycityway.com
Sorry to say, this was not a good answer. From the unanswered questions below, it would appear that Appium is still sorely lacking for IOS gestures, even in 1.1.0.

This is the best explanation I have seen from Sauce Labs, and I don't know how to use this.  getID does not work in IOS. ID is not supported by Find (By.id (whatever)) in IOS. Therefore, I have my doubts the following code snippet works.


// java
JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("direction", "down");
scrollObject.put("element", ((RemoteWebElement) element).getId());
js.executeScript("mobile: scroll", scrollObject);
Reply all
Reply to author
Forward
0 new messages