Answers for "python selenium scroll down on element"

2

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()
Posted by: Guest on May-05-2020
4

scroll to element python selenium

from selenium.webdriver.common.action_chains import ActionChains

element = driver.find_element_by_id("my-id")

actions = ActionChains(driver)
actions.move_to_element(element).perform()
Posted by: Guest on March-06-2020

Code answers related to "python selenium scroll down on element"

Python Answers by Framework

Browse Popular Code Answers by Language