[quote=“vidioten”]2) Marking a remote image and check if it is identical (or sub image) of an existing image in the image directory.
I want only to be sure that I don’t save the save image several times (under different names)[/quote]
This is an interesting idea, but the more images you have, the longer this check step would take to carry out. You can actually write an Eggplant script to perform this check, but you’d need to execute it manually whenever you wanted to perform the check, and you’d currently need to manually determine the coordinates to check on the remote screen. The “subimage” check would be particularly difficult, since it is the reverse of the search that Eggplant normally performs. We are looking for a subset of pixels within the remote screen; your suggestion is to look at a set of pixels on the remote screen and compare it to each previously captured image to see if it is a subset of one or more of them.
One suggestion is that if you think a particular captured image might work at a particular point in your script, simply try generating the command using that image and if Eggplant can’t find it on the screen it will let you know. You can reuse an existing image by holding down the Option key and clicking on a toolbar item (such as the Click item). Eggplant will then give you a dialog that allows you to select an existing image as the target for the Click command (or whichever command you selected). Eggplant will then try to execute the command as a standard step in saving it to the script and if it will alert you if it can’t find the selected image on the screen. This gives you the chance to cancel the action and capture a new image.
[quote=“vidioten”]4) Graphical mark of search area for a specific image
I want to easy select the parameters to SetSearchRectangle on the remote screen.[/quote]
We recognize that this could be a useful feature in some cases, although it runs counter to the idea that Eggplant is not a coordinate-based test tool and it would break the resolution independence of your scripts. The best way of specifying rectangular coordinates is to base it on the imageLocation() function, using either 2 images:
put (imageLocation("CloseWindowWidget"), imageLocation("OKButton")) into mysearchRectangle
a single image and a corner of the remote screen:
put (imageLocation("someScreenElement"), remoteScreenSize()) into mySearchRectangle
or a single image and the location of that image plus or minus some offset amount:
put (imageLocation("someScreenElement"), imageLocation("someScreenElement") + (100, 50)) into mySearchRectangle
To help with specifying the serach area in this way, we have provided a library of functions that take one or more images as arguments and return the corresponding rectangle. You can find that library in the Eggplant Examples forum at http://www.redstonesoftware.com/phpbb2/viewtopic.php?t=87.
I hope these ideas are helpful. We appreciate your feedback and suggestions.