E
E
Elick2021-01-24 20:46:37
Python
Elick, 2021-01-24 20:46:37

Is it possible using selenium in python to scroll the page from the current position up or down a couple of cm?

Is it possible using selenium in python to scroll the page from the current position up or down a couple of cm, no more?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wispik, 2021-01-24
@Elick

driver.execute_script("window.scrollTo(0, y)")
Instead of y, the number in pixels by how much to scroll

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question