Scroll Web Page Base On Pixel Method Using Selenium in Python Last Updated : 28 Apr, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report Selenium is a powerful tool for controlling web browsers through programs and performing browser automation. It is functional for all browsers, works on all major OS and its scripts are written in various languages i.e Python, Java, C#, etc, we will be working with Python. A Scrollbar is helped you to circulate round display in vertical route if the modern-day web page scroll does now no longer the seen place of the display. It is used to transport the window up and down. Selenium Webdriver does now no longer requires scroll to carry out moves because it manipulates DOM. But in positive internet pages, factors best emerge as seen as soon as the person has scrolled to them. In such instances, scrolling can be necessary. Requirements: seleniumYou need to install chromedriver and set the path. Click here to download. Step-by-step Approach: Step 1: Import required modules Python3 from selenium import webdriver import time from webdriver_manager.chrome import ChromeDriverManager # create instance of Chrome webdriver driver=webdriver.Chrome(ChromeDriverManager().install()) Step 2: Taking any URL. Python3 from selenium import webdriver import time from webdriver_manager.chrome import ChromeDriverManager # create instance of Chrome webdriver driver=webdriver.Chrome(ChromeDriverManager().install()) #url driver.get("https://www.countries-ofthe-world.com/flags-of-the-world.html") Step 3: Maximize the window. Python3 driver.maximize_window() Step 4: Scrolling base on the pixel. Python3 driver.execute_script("window.scrollBy(0,2000)","") Below is the full Implementation: Python3 from selenium import webdriver import time from webdriver_manager.chrome import ChromeDriverManager # create instance of Chrome webdriver driver=webdriver.Chrome(ChromeDriverManager().install()) #url driver.get("https://www.countries-ofthe-world.com/flags-of-the-world.html") #maximize window driver.maximize_window() #scroll by pixel driver.execute_script("window.scrollBy(0,2000)","") time.sleep(4) Output: Comment More infoAdvertise with us Next Article page_source driver method - Selenium Python P praveeny182 Follow Improve Article Tags : Python Python-selenium Python Selenium-Exercises Practice Tags : python Similar Reads How to scrape multiple pages using Selenium in Python? As we know, selenium is a web-based automation tool that helps us to automate browsers. Selenium is an Open-Source testing tool which means we can easily download it from the internet and use it. With the help of Selenium, we can also scrap the data from the webpages. Here, In this article, we are g 4 min read screenshot_as_png element method - Selenium Python Seleniumâs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout - Navigating links using get method â Selenium Python. Just bein 2 min read Download Google Image Using Python and Selenium In this article, we are going to see how to download google Image using Python and Selenium. Installation On the terminal of your PC, type the following command. If it triggers any error regarding pip then you need to 1st install pip on windows manually by python get-pip.py command then you can run 3 min read page_source driver method - Selenium Python Seleniumâs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout â Navigating links using get method â Selenium Python. Just bein 2 min read Web Driver Methods in Selenium Python Seleniumâs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout â Navigating links using get method â Selenium Python. Just bein 5 min read get_screenshot_as_png driver method - Selenium Python Seleniumâs Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout â Navigating links using get method â Selenium Python. Just bein 2 min read Like