I understand that we can utilize the following script to scroll down on a webpage:
(JavascriptExecutor) driver.executeScript("window.scrollBy(0,1000)");
However, I have a specific section on the page with a scroll bar. To reach the last element in that section, the locator for the last element will not be accessible until the page is scrolled down entirely. How should this situation be managed?