Is it possible to change the ImageInfo properties of an image from the script? For example, if you saved an image with Tolerant search type, can you tell your script to search this image using Text search type?
Being able to use ImageDoctor in the script will be even better. When my script fails to find an image, I want it to log the information that ImageDoctor displays when you click on the Search button (Dynamic Tolerance, Alternate type, etc)
Are any of those possible?
Yes, you can override image properties within the script. In your example, you could do the following:
Click (ImageName:"Giant Peach", SearchType:"Text", Tolerance:60, Discrepancy:"3%")
See the topic “Image Property List” in the Eggplant Reference for a complete list of the properties available to be overridden.
You can set the Image Doctor to “Auto Doctor” and it will try to automatically modify the image if it is found using one of the other search types. But this is really not a good idea – if you look at what happens when you use the Image Doctor, you’ll see that some of the more tolerant algorithms will locate some images far from where they actually appear. And making images match sort of violates the idea behind eggPlant that each step of the script has an inherent validation that what is on the screen is what should be there. Using the Auto Doctor you run some risk that your script will gloss over a problem in the application under test. It’s even more likely that if it modifies an image, it will cause the script to fail in a way that’s hard to diagnose because it’s no longer working against your original image.
That works great thx!
And dont worry, I would never turn Auto Doctor on )