I have tests in XCTest using Swift and I am trying to swipe through a feed until a condition is met. I am using the swipeUp()
, but the problem with this is it acts like a human swipe and has this painful animation of slowing down when it lets go. It doesn't try the swipe again until the slowing-down-animation is complete. Additionally, that method takes no arguments. I would like to see if there is something like Calabash or shoot even Androids Espresso where there are properties to a swipe method like swipeUp(fast)
or swipeUp(medium)
or even swipeUp(x0,y200)
.
Here is what I am trying to do in code:
func scrollDownUntilYouFindSomething() {
while !findingSomehting.exists {
app.swipeUp()
}
}
Simple enough, but the swipeUp() in XCUIApplication is painfully slow. I want to be able to swipe with precision and even by coordinate. I tried to use the coordinate approach taken from Replicate pull to refresh in XCTest UI testing
but its equally as slow when put into a loop.