WaitFor is Not working

Hey there,

I have below line of code to check for an image in SUT and waiting for the image using waitFor:2

If ImageFound(imageName:“My Image Here”, waitFor:2)
LogSuccess “Success”
LogError “Error”
End If

But it appears that, Eggplant becomes busy to identify the image on the SUT for more than 2 seconds mentioned. Due to this, its waiting unnecessarily for about 5 - 10 seconds extra.

In order to confirm this, I have actually used timer to validate that, its waiting for the image for more than 2 seconds.

If waitFor:2 is given then it ahould ideally wait for the image for only 2 seconds and not more than that.

I don’t write my imagefinds like that. I force them to run faster by making them little loops, looking every half a second just a few times. For example:

If imageFound(0.5, “image”) and repeatIndex() < 5 then
Log “Found expected image at:” & imagelocation
Log “Expected image not found within 2 seconds.”
End If

I have seen that occasionally with ImageFound(text:"some text") but never with an image. Could you provide a sample image to either the forum or your Technical Customer Service Manager?