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
from selenium import webdriver
t=10
while t:
#if you want to scroll to the end of the page,use this
driver.execute_script("window.scrollTo(0,document.body.scrollHeight);")
sleep(3)
#if you want to scroll down upto some level use this, here i used "1000" you may vary
#it according to your use
driver.execute_script("scrollBy(0,+1000);")
sleep(3)
#if you want to scroll some level up, use this,again i used here "-500" you may vary
#according to your use
driver.execute_script("scrollBy(0,-500);")
sleep(3)
t=t-1 # it`s a part of the loop
This will surely help you :)