scroll to bottom in selenium python
driver.execute_script("window.scrollTo(0, Y)")
scroll to bottom in selenium python
driver.execute_script("window.scrollTo(0, Y)")
how to scroll down to end of page in selenium python
SCROLL_PAUSE_TIME = 0.5
# Get scroll height
last_height = driver.execute_script("return document.body.scrollHeight")
while True:
# Scroll down to bottom
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
# Wait to load page
time.sleep(SCROLL_PAUSE_TIME)
# Calculate new scroll height and compare with last scroll height
new_height = driver.execute_script("return document.body.scrollHeight")
if new_height == last_height:
break
last_height = new_height
scroll to bottom in selenium python
ele =browser.find_element_by_tag_name('body')
ele.send_keys(Keys.END)
time.sleep(3)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us