Using Robot, is it possible to capture and compare an image at runtime before and after doing a specific operation? Window Image/Region image VP will not be of great use because the Image to be captured will vary based on the input data. For e.g, I need to compare the image of a document before and after rotation. But the document I use will vary for each test and hence I can't set a baseline for Window VP/Region image VP.
1. create 2 WindowVP
2. after execution of 1st VP use function actFilepath=SQAVpGetActualFileName(<1st VP name>,"IMG")
Now you have in "actFilepath" path to actual file of 1st VP, but you have to fix file name (for more information debug script and look at file name)
3. basFilepath=SQAVpGetCurrentBaselineFileName(<2n d VP name>,"IMG")
4. FileCopy actFilepath,basFilepath
5. execute 2nd VP
IMPORTANT NOTE: actual file will be created only if baseline is different.
You should suspend log output in execution time of 1st VP.
If it works pls let us know.
If you want to give somebody a fish, you'll do better if you teach him how to catch it.
Here's a solution that I made for XDE Tester. I believe I have another post somewhere in addition to this one where I show how to do captures of screens and components in robot. You should be able to compile the java class in the following post and combine it with the information in my post in this forum and come up with a nice image compare utility which doesn't rely on that God-forsaken Image Comparator that I've grown to hate with a passion.
Oh.. I almost forgot how I tied this in as a possible solution to this post. Imagemagick can do a rotation. It's conceivably possible that you might can tune it to predict the results of a rotation. ... or at least get close enough that you can look at the difference picture and justify the variations.