Though Selenium IDE is not extensively used in any project’s automation nowadays, you may need to use it for some basic automation. And while you are at it, you may encounter a need to take screenshot in Selenium IDE. There are 2 ways you can achieve this. This article details both of them.
Using captureEntirePageScreenshot command
Selenium IDE provides captureEntirePageScreenshot and captureEntirePageScreenshotAndWait commands to take screenshot of an entire web page. To use these commands, set Target value to a file name with location where you want your screenshot saved and you should be good to go. The command will take screenshot of entire web page. Below screenshot illustrates how to use these commands.
Using plugin to take Screenshot in Selenium IDE
The Selenium IDE plugin here captures screenshot every time your test fails. Once installed, you should see a button for this plugin in your Selenium IDE window. Enable this button when starting your test run. A screenshot of entire web page will be captured and saved whenever a command gets failed during test execution. The only catch of this plugin is, it doesn’t capture screenshot of passed test case as well. While not necessary, it would have been a welcome addition.
Check out below screenshot which shows a plugin button in Selenium IDE and a sample report generated by this plugin.
Apart from these 2, do you know any other way we can take screenshot in Selenium IDE? Do share it with us in comments.