https://i.sstatic.net/ogpqZ.png
I have included the following code snippets for scrolling:
Scroll Down:
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("window.scrollBy(0,250)", "");
jse.executeScript("scroll(0, 250);");
Scroll Up:
jse.executeScript("window.scrollBy(0,-250)", "");
OR,
jse.executeScript("scroll(0, -250);");
No errors were encountered while executing this. The test case has passed successfully.
Please refrain from referring to the link below as I have already tried and verified it without success. Kindly provide alternative solutions.
Page scroll up or down in Selenium WebDriver (Selenium 2) using java