hoping someone can help me here, I have a website that takes a while to load, in order to successfully load all images on the page, I need to keep scrolling down while the page is still loading. I can not wait for the page to load first and then scroll.
I am aware of using the following to scroll to the bottom of the page, I have tried running this on a separate thread in a loop prior to and after getting the url with driver.get("SITE HERE"); to try and keep the page scrolling to the bottom until it has fully loaded.
JavascriptExecutor js = ((JavascriptExecutor) driver);
js.executeScript("window.scrollTo(0, document.body.scrollHeight)");
This has not worked and I am at a loss on how to get selenium to scroll a page while it is still in the process of loading.