Selenium Tutorial for Beginners

Scroll in Selenium Webdriver using Java (Horizontally | Up and Down)

To scroll in Selenium Webdriver using Java, we use the JavascriptExecutor interface which provides mechanism to execute Javascript. It provides “executescript” & “executeAsyncScript” methods, to run JavaScript in the context of the currently selected frame or window. Simply stated “Javascript can be executed within the browser with the help of JavaScript Executor.”