I had the same thought and implemented below method.
//This method scrolls downwards / swipe upwards only
public void scroll(AppiumDriver driver,By by)
Dimension size = driver.manage().window().getSize();
driver.swipe(startx, starty, startx, endy, 1000);
We can call the method something like below, however we can implement this method with By or text etc…
Is there a way that we can find out we scrolled end of the search list or something? Because the above logic works out as far as the search string/object exists. Incase if the object doesnt exists, and if we are at end of the list then we should throw that item not found.
Is there any better way handling the above?