Hi Naetik, you can use the Actions class to perform, scroll down in Selenium, or scroll up. 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();
}
}