snap990 1 Posted January 18, 2021 Report Share Posted January 18, 2021 Hi Guys! Could you help me with an ideea, how can i stop a loop if javascript scrolldown is ended? I am talking about this window.scrollTo(0,document.body.scrollHeight); I have a loop that i give a value=100, to scroll to the page and collect some information. I have a problem when some pages have 10scrolls, and some have 100scrolls. There is any way to stop and go to next navigation, if the scroll is ended, or if listtotal is the same value for 2 times? Thank you! Quote Link to post Share on other sites
bestmacros 60 Posted January 18, 2021 Report Share Posted January 18, 2021 yes, just scrape the objects which appear when you scroll and compare list size before scroll and after scroll - if after the scroll and scrape you have same list, then no new items appear after the scroll so no point to scroll again. 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.