← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #254721]: Unable to match the image using "exists" method

 

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

    Status: Needs information => Answered

RaiMan proposed the following answer:
exists() definitely returns null, if the image cannot be found in the
specified region.

If it does not return null and the image is not visible, then it has
found something else similar.

Please consult the docs, how to use Pattern().similar() to increase the
needed similarity score to avoid false positives.

BTW:

   if (s.exists(a) != null) {
    System.out.println("1st");
    s.getLastMatch().highlight(2)

will reveal, what was found and in the log message you can see the
similarity score.

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