One of the challenges I am facing is that on my page, when I manually scroll it grows and then allows me to continue scrolling until I reach the bottom. This behavior is similar to a Facebook timeline page.
In an attempt to address this issue, I have written the following code:
static IWebDriver driver = new ChromeDriver(@"C:\selenium\net40");
IJavaScriptExecutor js = driver as IJavaScriptExecutor;
After navigating to a page, I executed the following:
js.ExecuteScript("window.scroll(0, document.height)");
However, I found that I can still scroll further even after reaching what appears to be the bottom of the page.
I am seeking advice on how to modify the script to ensure that it scrolls to the actual bottom, even if the content continues to grow dynamically.
Any help or suggestions would be greatly appreciated!