Setting the Image SearchType

Hello,

Is there a way to set the image searchtype without having to manually click on each image? Image searchtype is set to Precise, I want to change it to Tolerant.

I have try the following code, but it does not seem to set the searchtype like how I indicate it to be.

set IFound to ImageFound(0, (ImageName: item intCounter of ListOfImage, SearchType: “Tolerant”, Pulsing: true))

Also is there a way to set the discrepancy of an image as well through code, please.

Thanks!

Is there a way to set the image searchtype without having to manually click on each image? Image searchtype is set to Precise, I want to change it to Tolerant.

In the latest release of eggPlant (v12.20), you can change the search type for multiple images at once by selecting multiple images in the image browser of the image viewer in your suite window. Then you can go to the “Searching” area of the image viewer. To select multiple images at once, hold down the shift key while clicking.
For visuals of what I’m describing, you may want to look at this portion of our documentation: http://docs.testplant.com/?q=content/viewing-images

I have try the following code, but it does not seem to set the searchtype like how I indicate it to be.

set IFound to ImageFound(0, (ImageName: item intCounter of ListOfImage, SearchType: “Tolerant”, Pulsing: true))

What indication are you seeing that the search type is not being set?
The code you included may work better if you do this:

Set ImageToFind to item intCounter of ListOfImage
set IFound to ImageFound(0,(Imagename: ImageToFind, SearchType:"Tolerant",Pulsing:True))

Also is there a way to set the discrepancy of an image as well through code, please.

You can set this with a “Discrepancy” parameter, the same way you’ve used the “SearchType” parameter. See a full list of image search parameters here: http://docs.testplant.com/?q=content/eggplant-commands-and-functions#image-references

When I imported the image to the Image Well, the defined SearchType is “Precise”, so I just left it the way it is. Then in my code I change the SearchType to “Tolerant” but the image could not be found. However, when I click on the image and physically change the SearchType to “Tolerant”, the image is found.

Thank you for calling this to our attention. It has been verified and should be fixed in the next release of eggPlant.