← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #242340]: How to handle when there are high similarity scores for enabled and disabled button Patterns?

 

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

Andrew C posted a new comment:
Thanks for your responses. I'll give that a try sometime.

Since I posted that question, I did some further investigation and found
that the score of the enabled button to the enabled button on screen
would range from 1.0 to 0.999998 over time while the application was
run.

To make some progress, I used the lower value as a threshold to polled
the score of the button to determine whether button state had changed.

ie
while (time has not run out)
{
if current button scope >= threshold score //check is current score is in the range of the enabled button, exit loop if is
break
else 
thread.sleep(2000); //sleep for 2 seconds
}


Not sure whether this is the best or most robust approach. Any thoughts?

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