Hi Naetik, you can use Actions class in Selenium to perform page scroll up/down. Following test script uses Actions class to Scroll Up/Down a page:
import java.io.IOException;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
public class Page_Scroll_Actions {
public static void main(String[] args) throws IOException {
System.setProperty("webdriver.gecko.driver", "D:\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("https://www.amazon.com/");
Actions actions = new Actions(driver);
// Scroll Down using Actions class
actions.keyDown(Keys.CONTROL).sendKeys(Keys.END).perform();
// Scroll Up using Actions class
actions.keyDown(Keys.CONTROL).sendKeys(Keys.HOME).perform();
}
}