Ah right. Well there may be a better way to do this but I made a swipeDown method that goes like
def swipeDown
@x = window_size[:width]/2
@y = window_size[:height] - 200
@startCords = [@x,@y]
@endCords = first_text.location
swipe(start_x:@startCords[0],start_y:@startCords[1],end_x:@endCords[0],end_y:@endCords[1], duration:3000)
end`
and then I made a swipeToFindMethod
def swipe_to_find(textParam)
for i in 0..3
begin
if wait{find(textParam).displayed?} == true
return true
end
rescue
swipeDown
end
end
end
You can change the for loop to however many times you want, but you don't want it to keep searching forever