Android - Scroll till end of the page, don't know the laast element on the page

In my test case i need to scroll down till last page. I don’t have last element present on page.
Can somebody help me to handle this scenario.

This is for Android and i am using Appium Version 1.3.14

Thanks in advance

you Appium version is too old

I don’t fully understand what you are asking for here. But in cases where I need to grab information that spans multiple pages, I create a loop that grabs pageSource to examine elements on the page, scrolls down and repeats until I know I’m at the last element, or until two pages in a row have the same elements on them, meaning you can’t scroll anymore (the end).

@Brian_Watson

Page source comparison before and after scroll would be heavy on computation, right? any other solution? Please share your experience on Android and iOS both.

Grabbing page source for Android is very fast. And doing a comparison of items in that source in memory is even faster!

You got any solutions.??? I am facing similar issue.