← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245286]: Sikuli radio button with associated text

 

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

    Status: Open => Answered

Eugene S proposed the following answer:
Hi,

Given you don't have any more similar radiobuttons in the SAME
HORIZONTAL LINE, you can try something like that:

1. Create a pattern (image) of the "Yes" text
2. Create a pattern (image) of checked and uncecked radio button (any of them, since both are similar)
3. Apply the following code:

regionYes = yestext.left()
if region.exists("checkedButton.png"):
    regionNo = yestext.right()
    # there is no actual need to UNCHECK "yes" since radiobuttons of this kind shoudl be mutually exclusive
    regionNo.find("unCheckedButton.png").click()


Cheers,
Eugene

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