← Back to team overview

sikuli-driver team mailing list archive

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

 

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

Hello,

I am trying to use sikuli to operate a flash player application. I am coding in Java using the sikuli-script.jar from the SikuliX-1.0.1 release.

In this application there is a button that has two states - enabled and disabled. My approach is to wait for the button to turn from disabled to enabled so I can click on it. 


My code logic follows (in pseudo code) 
if disabled button exists on screen 
{
waitvanish disabled button //wait for the disabled button to disappear
}
wait for enabled button //confirm enabled button exists on screen. 



My problem is that the similarity score for my image of the disabled button is extremely high. The score of my collected image of the disabled button to the enabled button on screen was 0.987. (The score of the collected image of the enabled button to the enabled button on screen was 1.0). In person you can see a difference in the two collected images. The shading is darker on the disabled button. The enabled button has a pink/red coloured ring and the disabled button is more burgundy coloured ring.


I have tried setting the minimum similarity to 0.99, but then the rest of the program falls over. 


What else can I do have the enabled and disabled button become more distinguished? Is my code logic okay?



thanks in advance
Andrew






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