@rekaa0251 What you can do is:
scroll
then get elements
add elements to an array
scroll again
get elements (even if they are the same)
add them to the array
In the end, delete all duplicates, and you have the full list.
if you want to understand when to stop, either add a counter and if the elements are always the same after 10 times of scrolling then it's probably the end