Home / Companies / Sauce Labs / Blog / Post Details
Content Deep Dive

Selenium Tips: Taking ScreenShots on the Server

Blog post from Sauce Labs

Post Details
Company
Date Published
Author
Matthew Heusser
Word Count
216
Language
English
Hacker News Points
-
Summary

Selenium can be used to take screenshots of a web page in order to check for unanticipated changes. This can be done by comparing the captured screenshot with the current screen pixel-by-pixel or by storing the screenshots away and having a human review them. Selenium provides a `save_screenshot` command that can be used to capture screenshots, which can be implemented using plain vanilla webdriver or extensions provided by partner companies like Applitools. The code for taking a screenshot in Ruby and Python is provided as an example and can be found on GitHub for further use and modification.