Friday, 9 August 2013

How to Capture Screen Shot on All Test Failures in Selenium

Code to take screen shot in Selenium using python -
#!/usr/bin/env python
from selenium import webdriver
browser = webdriver.Firefox()
browser.get(’http://www.google.com/’)
browser.save_screenshot(’screenie.png’)
browser.quit()

No comments:

Post a Comment