scroll element into view selenium python code example
Example 1: 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()
Example 2: selenium scroll element into view inside overflow python
element = d.find_element_by_xpath("//span[.='Most popular']")
d.execute_script("return arguments[0].scrollIntoView();", element)