Mobile Testing: Scroll down until specific element is present. (Optimization Tips)

Hi everyone! I have here a while condition, that it will scroll down the screen and check if a specific element is present until it reaches the bottom of the screen. Then if not present, it will click the next page button and will scroll down again and check if the element is present.

My problem is, it will scroll down then it will stop for I think 1-2 mins. then it will scroll down again, then it will stop again for 1-2 mins. Maybe you can help me to identify what are the possible reasons why it is like that and how to fix it. Just a newbie in mobile testing. :slight_smile:

Thank you in advance!

Test Case: Betting

Keywords (scroll.groovy):


Log Viewer: