[quote=“rihasz”]Question in details:
- I have a captured image made by Eggplant (in the test designing development period - this image will be my expected result)
- During the test running I make another capture image (this is my actual image)
- Is there any function or method of eggplant which enables my test to compare these two images (the actual and the expected) and if there any difference how can I retrieve the differential image?
Eggplant’s comparisons are of the found/not found variety. The fact that it didn’t find the image means that it can’t tell you what the difference is, because it doesn’t think the image is on the screen.
The easiest way to find the differences (and the method I use) is to use Photoshop, Photoshop Elements, or GraphicConverter. The process I use in Photoshop Elements is as follows:
Open a screenshot of the SUT in Photoshop Elements. If your script failed on this image, then you can use the Screen_Error.tiff file that was generated automatically:[list=a]
Click the “Show Results” toolbar item on the script window.
[*]A thumbnail view of the Screen_Error.tiff file should be displayed int he upperright corner of the Results tab. Click on it and drag it to the Photoshop Elements icon on the Dock (if Elements isn’t open, this will open it).
If there is no Screen_Error.tiff file, you can use the CaptureScreen item on the Connection menu to create a screen shot.
[*]Open your captured image in Elements and do a select all and copy to put it on the clipboard.
[*]Bring up the screenshot and paste the captured image onto it. This will generate a new layer in the screenshot image.
[*]If necessary, drag the pasted image until it is at least roughly aligned over the part of the screen you expected it to match.
[*]In the “Layers” palette, click the blending dropdown (it’s not labeled – it should be showing “Normal” as the current selection) and select “Difference”.
[*]The pasted image should now be a rectangle of black, white, and shades of gray – the lighter the pixel, the greater the difference between the captured image and the screenshot. Black pixels indicate that the images are the same. Use the arrow keys to nudge the captured image into alignment with the screenshot layer. This is usually easier to do if you use the magnifying glass tool to zoom in on that part of the image; this also makes it easier to see where the differences are.
[*]If you mouse over the pixels in the captured image layer, the RGB values will be displayed in the Info panel. This shows you the difference in intensity of each of these channels – Eggplant’s Tolerant search type allows a difference of up to 45 +/- in each channel by default.
As I mentioned, you can do the same thing in the regular version of Photoshop, and a similar process in GraphicConverter.
We would like to add this sort of feature directly into Eggplant in the future, but it may be some time before it makes it far enough up the priority list to get into a release – it would be a nice convenience feature, but it doesn’t really serve our core mission directly.
Let us know if you have any other questions.