How to scroll the webpage to the top of the page.
I know scrolling the page to the bottom is:
window.scrollTo(0,document.body.scrollHeight) <
window.scrollTo(0,document.body.scrollHeight)
This solution also works correctly, I've checked it:
((JavascriptExecutor) driver) .executeScript("window.scrollTo(0, -document.body.scrollHeight)");