O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Capturing screenshots

A lot of the time our Selenium remote control browsers will be running on different machines than the machine that starts the tests. This is because you, as a developer or tester, need a mechanism to have a screenshot of what the error looks like when the test failed. Images that are captured are saved in PNG format.

Unfortunately capturing screenshots in Selenium is limited to real browsers such as Mozilla Firefox, Google Chrome, and Internet Explorer. This is because these browsers have libraries that Selenium can use to take screenshots. As more libraries are added to Selenium for different browsers, you will be able to take more screenshots. They will use the same API call so there will be no need to change your tests. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required