Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to perform a pull to refresh while automating with EarlGrey?

Tags:

earlgrey

Suppose you have a tableView or fileListView, and you would like to perform a pull to refresh action on the same. Tried performing with swipe and scroll, there was no result initially.

like image 403
Arjun Kalidas Avatar asked Sep 16 '25 08:09

Arjun Kalidas


1 Answers

EarlGrey().selectElementWithMatcher(grey_accessibilityID("some element id")).atIndex(0).performAction(grey_swipeSlowInDirectionWithStartPoint(.Down, 0.7, 0.7))

atIndex(0) is context specific. In my case, I had a list view and I hooked on to the first element and did a slow swipe down. Similarly, the value '0.7' is also relative, you can change those to 0.1, 0.3, etc and try out yourself.

like image 147
Arjun Kalidas Avatar answered Sep 19 '25 14:09

Arjun Kalidas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!