← Back to team overview

sikuli-driver team mailing list archive

[Question #212915]: assert exists() not accurate?

 

New question #212915 on Sikuli:
https://answers.launchpad.net/sikuli/+question/212915

I am trying to assert a picture however sometime it passes and sometime it fails. its almost like assert exists() doesn't like the image.

the image is just a screen shot of 3 blocks of numbers. I have  a screen shot of what the 3 sets of numbers should be and then i put:

         if not exists("image.png"): exit(1) 
         else: exit(0) 

and then to test that, i go delete a piece of data from my program that causes the numbers to be different

i run the assertion and it exits with code 0 as if the assertion saw the proper numbers which are obviously different.

I also tried with just assert exists(image.png) and it still passes doesnt fail

its almost like assert exists() says "i see 3 blocks and thats ok for me but i don't care if the numbers are actually different"

sometimes it will fail if i use completely different numbers that cause the blocks to get larger or longer which is not what i want.

I want to assert values on the screen..

how can i fine tune this more to make it more accurate?

I have already tried the items below to narrow the search region:

with Region(find("image.png")):

as well as using the IDE command for set region which just shows a screen shot instead of some code


is it possible to do what i want to do?


thanks so much 



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