I have a problem with triggering lazy loading on scroll with PhantomJS. None of the previous answers (even accepted ones) worked for me. Most were for old PhantomJS versions.
Other questions - almost same or similar to mine without or with answers that are not working:
- not able to lazy load in phantomjs
- How to scroll down with Phantomjs to load dynamic content
- https://github.com/ariya/phantomjs/issues/11512
All of them tries to utilize window.document.body.scrollTop = document.body.scrollHeight
with page.evaluate()
or even if they try to use proper page.scrollPosition
then for some reason they use some explicit gathered hard coded scroll values, or limits theirs scrolls for some elements that should be on the page when scroll is available.