How can I scroll in a browser?

Silk4J provides the following ways to scroll controls in a browser into view during replay:
executeJavaScript method (DomElement)
Use the scrollIntoView method to scroll a specific DOM element into the visible area of the browser window.
executeJavaScript method (BrowserWindow)
Use the executeJavaScript method to scroll the entire page up or down by a specified range.


The following command scrolls one page down:
browserWindow.executeJavaScript("window.scrollBy(0, window.innerHeight)");
The following command scrolls down 100 pixels:
browserWindow.executeJavaScript("window.scrollBy(0, 100)");
The following command scrolls up 100 pixels:
browserWindow.executeJavaScript("window.scrollBy(0, -100)");