Scroll¶
Methods for scrolling the page.
scroll_to(x=0, y=0)¶
Scrolls the page to a specific position.
driver.scroll_to(0, 500) # Scroll 500px down
driver.scroll_to(0, 0) # Back to top
driver.scroll_to(200, 300) # 200px right, 300px down
scroll_to_bottom()¶
Scrolls to the bottom of the page.
scroll_to_element(selector)¶
Scrolls until the element is visible (centered on screen).
driver.scroll_to_element("#results")
driver.scroll_to_element(".footer")
driver.scroll_to_element("a#last-link")