Answers for "how to scroll to bottom of page in selenium python"

0

scroll to bottom in selenium python

driver.execute_script("window.scrollTo(0, Y)")
Posted by: Guest on February-27-2021
0

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
Posted by: Guest on June-07-2021
0

scroll to bottom in selenium python

ele =browser.find_element_by_tag_name('body')
ele.send_keys(Keys.END)
time.sleep(3)
Posted by: Guest on February-27-2021

Code answers related to "how to scroll to bottom of page in selenium python"

Python Answers by Framework

Browse Popular Code Answers by Language