Python - Selenium - Take screenshot of webpage

By xngo on June 20, 2019

Selenium is able to take screenshot of the webpage that it visited. This feature is useful when the appearance of the webpage needs to be reviewed by either the graphic designer or by your clients. As a result, you can automatically send screenshots to your reviewers for every new release.

from selenium import webdriver
# Create chrome driver.
driver = webdriver.Chrome()
# Open the webpage.
# Take screenshot of
# Close.


Screenshot taken by Selenium

About the author

Xuan Ngo is the founder of He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.