← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #216688]: How to get checkbox value from an application using Sikuli scripting

 

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

    Status: Answered => Open

ambiga is still having a problem:
Hi Roman,

Scenario 1:
==========
Am trying a simple pgm to check if a checkbox is ticked or unticked. Am using 2 images(one with the checkbox ticked and other with checkbox unticked). But it is treating both as same images, i.e., not differentiating the ticked symbol present.
Code:
--------
if exists("checkboxtickedimg.png"):
    popup("yes")
elif exists("checkboxuntickedimg.png"):
   popup("no")

Whether the checkbox is ticked or  unticked, it is executing only the
first loop.


==============================================================================

Scenario 2:
==========

Also i tried with the region concept, I created a small region in
'Taskbar and Start menu peoperties". And trying to analyse whether the
tick mark exists in the 1st checkbox, using the below code:


regi = "TaskbarStart.png"
if (regi.exists("1355735603254.png")):
    popup("ticked")
else:
    popup("unticked")

Facing the issue:
==========
[error] Stopped
[error] An error occurs at line 2
[error] Error message: Traceback (most recent call last):
 File "C:\Users\ambigaj\AppData\Local\Temp\sikuli-tmp2205391485963534774.py", line 2, in 
 if (regi.exists("1355735603254.png")):
AttributeError: 'str' object has no attribute 'exists'

Please help me out in this.

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