sikuli / sikuli-slides

Sikuli-Slides is a visual automation tool that enables users to automate and test Graphical User Interfaces (GUIs) using presentation slides.
MIT License
65 stars 35 forks source link

-min_score does not work #50

Open LeoYao opened 9 years ago

LeoYao commented 9 years ago

I am trying using "exist" keyword to check if a checkbox is checked or not. I found no matter what status the checkbox is in, sikuli-slide always return true as the result of "exist" action. I think it should be related to the similarity of the image, because I had similar issue in SikuliX and fixed it by increasing the similarity threshold to 0.95. However, I found even if I increased the threshold in Sikuli Slides by setting "-min_score" from 0.80 to 0.99 on command line, the result remains incorrect.

I checked the source code and I found a possible cause. In org.sikuli.slides.api.sikuli.CrossSearchStrategy, there is some hardcode like below:

Target target = hypothesis.getTarget();
target.setMinScore(0.8f);

I tried changing 0.8f to 0.95f, and the result seems correct now. However, it seems there are lots of place not using min_score, such as ContextImageTarget.

I am wondering if the min_score is really in use or has not been implemented?