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)
simple way for the top :webDriver.FindElement(By.TagName("body")).SendKeys(Keys.Home); and for the bottom: webDriver.FindElement(By.TagName("body")).SendKeys(Keys.End);
webDriver.FindElement(By.TagName("body")).SendKeys(Keys.Home);
webDriver.FindElement(By.TagName("body")).SendKeys(Keys.End);