Capture a Screenshot in Selenium WebDriver
Join the DZone community and get the full member experience.Join For Free
Example of capturing a screenshot from Selenium WebDriver in Python:
#!/usr/bin/env python from selenium import webdriver browser = webdriver.Firefox() browser.get('http://www.ubuntu.com/') browser.save_screenshot('screenie.png') browser.quit()
Published at DZone with permission of Corey Goldberg, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.