← Back to team overview

sikuli-driver team mailing list archive

[Question #222874]: Checked and uncked checkboxes

 

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

I would like to write the following test:

If the checkbox is checked then press the Login button. If the checkbox is unchecked then check the checkbox and press the Login button. 
checkboxregion1= Pattern("checked.png").targetOffset(-46,0)
if checkboxregion1.exists("tick.png"):
   checkbox1checked = True 
   click("Login.png")  
else:
     if checkboxregion1.exists("untick.png"):
          checkbox1checked = False 
          checkboxregion1.click("untick.png")
          click("Login.png")

When I run the script Sikuli gives an AttributeError: 'org.sikuli.script.Pattern' object has no attribute 'exists'. 
What should I  change?


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