scroll to the bottom of the page selenium python code example

Example 1: python selenium scroll all down

from selenium import webdriver
import time

browser = webdriver.Firefox()
browser.get("https://en.wikipedia.org")
browser.execute_script("window.scrollTo(0,document.body.scrollHeight)")
time.sleep(3)
browser.close()

Example 2: scroll to bottom in selenium python

ele =browser.find_element_by_tag_name('body')
ele.send_keys(Keys.END)
time.sleep(3)

Example 3: scroll to bottom in selenium python

driver.execute_script("window.scrollTo(0, Y)")