← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #169742]: cannot find image after sometime

 

Question #169742 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/169742

    Status: Open => Answered

RaiMan proposed the following answer:
If a script runs at one time and does not run another time, then
something must have changed.

So if it really is the same script with the same captured images, then
the screen content must have changed. Using similar(0.99) is critical in
situations, where the background around the target image might change
slightly. Or even some animations in the picture might lead to fail.

try to use similar(0.9) or less. The similarity sometimes does not help,
to force Sikuli, to find a specific pattern, if there are similar ones.
If this is the problem, you have to either restrict the search region to
the area, where the target image should be, or use findAll and select
the right match afterwards.

use 
find("some image.png")
print getLastMatch()

to get the information about the similarity of the match.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.