I\'m having issues with scrolling to the top of the web page when using Python and Selenium.
When the page loads for some reason you are taken to the bottom of the
There are 4 ways to scroll up or down
1)scroll by pixel
driver.execute_script("window.scrollBy(0,0)","")
2)scroll down until the element is not found
element=driver.find_element(By.XPATH,"xpath of element")
driver.execute_script("arguments[0].scrollIntoView();",element)
3)scroll till the end of the page
driver.execute_script("window.scrollBy(0,document.body.scrollHeight)")
using Action Chains
elementpos=driver.find_element(By.XPATH,"xpath of element")
actions=ActionChains(driver)
actions.move_to_element(elementpos).perform()