Python Selenium – Scroll up to top of the page
This code scrolls the page to the position of (0, 0) which is the top left corner of the webpage.
In the following program, we load the URL https://pythonexamples.org/#colophon, which loads the page and by default scrolls to the element with id=colophon, which is at the bottom of the page. Then using execute_script() method, we shall scroll up to the top.
In this Python Selenium tutorial, we have seen how to scroll up to the top of the page, with examples.