← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #158158]: Is there a way to test 'enabled'/'disabled' status of a button?

 

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

eliteSKL posted a new comment:
can you check the score? an evaluate it that way? I assume this bug is
going to give you varying scores... but it might work.

arg1="button-checked.png"
arg2="button-not-checked.png"

def is_it_clicked(arg1,arg2):
     reg=Region()
     score_one=reg.exists(arg1,0).getScore()
     score_two=reg.exists(arg2,0).getScore()
     if score_one<score_two:
          print "button is checked"
     elif score_one>score_two:
          print "button is not checked"
     else:
          print "ugh..... it's a bug and i can't figure it out.... wait till next release."

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