Selenium IDE allows you to capture snapshots of webpage anywhere inside your program. This feature or function comes handy when you want to have some visual proof in the form of images after your program execution for QA verification of the way the pages are rendered, or for any other QA comparisons.
In order to achieve this, we use one simple command from Selenium IDE i.e, "captureEntirePageScreenshot"
Steps to demonstrate an example usage of this function:
1. Open Firefox browser
2. Open Selenium IDE from Tools menu as discussed in Installing Selenium IDE section
3. Create new test inside Selenium IDE
4. Inside your test case,
a. Base URL: http://www.google.com/
b. Command 1: open
Target: / notes: here "/" refers to base URL
c. Command 2: captureEntirePageScreenshot
Target: "C:/MyIDESnapshot/test.png" notes: this is the location where your snapshot will be saved. Make sure you have the location "C:/MyIDESnapshot" exists, otherwise you might see unexpected behavior or errors during execution.
In order to achieve this, we use one simple command from Selenium IDE i.e, "captureEntirePageScreenshot"
Steps to demonstrate an example usage of this function:
1. Open Firefox browser
2. Open Selenium IDE from Tools menu as discussed in Installing Selenium IDE section
3. Create new test inside Selenium IDE
4. Inside your test case,
a. Base URL: http://www.google.com/
b. Command 1: open
Target: / notes: here "/" refers to base URL
c. Command 2: captureEntirePageScreenshot
Target: "C:/MyIDESnapshot/test.png" notes: this is the location where your snapshot will be saved. Make sure you have the location "C:/MyIDESnapshot" exists, otherwise you might see unexpected behavior or errors during execution.
5.Run your program by clicking on play current test case button
6.Note that webpage with url "http://www.google.com/" is opened and a snapshot is stored to the location you passed as argument to "captureEntirePageScreenshot" command
Happy Testing :)
Shiva Krishna Imminni
Shiva Krishna Imminni
Thanks for taking time to explain about the procedure for selenium IDE, it helped me more and quite useful for learning some new process.
ReplyDeleteRegards,
Selenium Training in Chennai|Selenium Training