← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #255783]: Capturing the Pattern found as part of the Match object returned

 

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

skeets posted a new comment:
Maybe we are doing something wrong in how we are using it?  Here is our
example:

expectedImgPath = c:\path_to\expected_image\to_find_on\screen.png
minSim = 0.99

# create pattern to search for
expectedPattern = Pattern(expectedImgPath).similar(minSim)

# see if a Match exists, of the expectedPattern, in the window
imgMatch = theWindowToSearch.exists(expectedPattern)

if (imgMatch is not None):
    # get the screen image path Sikuli used to find the Match of the expectedPattern
    resultImgPath = imgMatch.getLastScreenImageFile() # not always the same as expected image

We then go on to add results to an HTML file showing the expectedImgPath
in one column, resultImgPath in another and then the match score in the
last column.  This is where we can sometimes see that the expected image
is not seen in the result screen image even though the match score is
showing over 0.99.  Again for the MOST part, say 95% of the time, it
appears to be working, which is WAY better than before.

Our expected image that is found is only on screen for 0.5 seconds and
then disappears if that matters?  We are basically testing that an icon
is blinking.

Thanks again.

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