← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #661313]: region.find(image) question/issue

 

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

    Status: Answered => Open

Gary Paschke is still having a problem:
Thanks for all your time in helping resolve my confusion/understanding
in this simple use case.  I still am not getting results I would expect
based on the simple script logic below.

If I run as is, I get "test passed", as expected. However, lets say, I add a small square markup (e.g. 10 x10pixel) on the 3D_Reciprocating_Saw_Gold.png with MS Paint and save. When I re-run script below, it still passed. If I exaggerate the square 
to say 25x25pixel, it FAILED. I would expect ANY change to the saved 3D_Reciprocating_Saw_Gold.png to cause a failed test run, which is what we require. The test run (sikulix script) must match exactly what we are comparing on disk (i.e. 3D_Reciprocating_Saw_Gold.png)


image="D:\\Tc_Auto_Tests\\Images\\3D_Reciprocating_Saw_Gold.png"
r = Region(225,200,1675,810)
pimage = Pattern(image).exact()

if r.exists(pimage, 5):
   print "Screen matches 3D_Reciprocating_Saw_Gold, test passed"
   r.highlight(2)
else:
   print "Screen failed match of 3D_Reciprocating_Saw_Gold, test FAILED"


Any change I can upload an avi or word doc which may help?

Thanks

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.