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

2014-09-10 Thread Krishna Teja
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Krishna Teja posted a new comment:
Hi can any body help with the java code to select a radio button from
multiple radio buttons

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-12 Thread Eugene S
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Eugene S posted a new comment:
Happy to help :)

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-12 Thread Helene Pedata
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Helene Pedata posted a new comment:
Hi Eugene,
  Seems like I had focus issues yesterday resulting
In failed finds. At the time, I did not have exception handling so it was not 
obvious the find was failing. 
 So I really did not see differences between the Mac and 
Linux versions. I have made great progress and want to thank you for all your 
help!
Helene

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-11 Thread Eugene S
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Eugene S proposed the following answer:
Hi Helene,

I don't know whether there are differences between the Linux and Windows
or Mac versions however, if you see that the same code works on Mac,
then it makes sense that there are. RaiMan probably will know better.

generally, if the match is not found, you will get a FindFailed
exception so the error you're getting probably means that there is no
such method.

Eugene

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-11 Thread Helene Pedata
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Helene Pedata posted a new comment:
Hi Eugene,
I just realized since it says int object, it is not finding the match. Right?
HP

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-11 Thread Helene Pedata
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Helene Pedata posted a new comment:
Hello Again,
   Yes, make sense!  Can you tell me if the linux version of Sikuli behaves 
differently than the mac version?

find("Yes.png").left() does not seem to work on the linux version.

The error is 'int' object has no attribute 'left'

I am assuming it is executing the find() and returning a match object.
Then tries to perform the left() but cannot because left is not a
function for a match object.

If i leave out the left, it does find the "Yes".

However if I perform the same command on the mac, it works as expected.

Thanks
HP

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-10 Thread Eugene S
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Eugene S proposed the following answer:
Hi,

What can be a problem is that the radiobutton region is "shorter than your Yes 
region (if that makes sense?  :) ) 
So make sure that when you create a pattern for "Yes" text, it will COMPLETELY 
COVER the radiobutton pattern to the left of it. Ideally, the radiobutton 
should be minimalistic(include only the radiobutton itself with no spare pixels 
above or below it) while the "yes" pattern should be a bit higher (with a 
couple extra pixels above and below).

BTW, you can use ".highlight(1)" method to see the exact area you are working 
on at the moment.
So, for example,  when you find the "yes" text on the screen, you can first try 
something like that:

region = find("yesText.png").highlight(1) # 1 means - highlight it for 1
sec

Then when you expand the region, highlight it as well. This way you'll
be able to see whether it completely includes the radiobutton. So:

region2 = region.left().highlight(1) # Here make sure that the radiobutton 
pattern is completely enclosed within this area.
region2.find("radiobutton.png").highlight(1)


This should give you a better ideas as where the problem is.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-10 Thread Helene Pedata
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Helene Pedata posted a new comment:
Hi Eugene,
   The code does not seem to recognize the radio box to the left of the Yes 
text.

The condition
  if regionYes.exists("Checked_Button.png"):  Fails
  else:
 regionYes.exists("UnChecked_Button.png"): Fails as well.

Thanks for you help!
HP

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-10 Thread Helene Pedata
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Helene Pedata posted a new comment:
Thanks Eugene! I'm trying it now. Will let you know :)

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-10 Thread Eugene S
Question #245286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245286

Eugene S posted a new comment:
Couple of mistakes I've made:

Instead of line:
regionYes = yestext.left()

Should be:
regionYes = find("yestext.png").left()


Instead:
if region.exists("checkedButton.png"):

It should be:
if regionYes.exists("checkedButton.png"):


Hope there are no more errrors like these. Anyway, if there are, let me know.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-10 Thread Eugene S
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.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2014-03-10 Thread Helene Pedata
New question #245286 on Sikuli:
https://answers.launchpad.net/sikuli/+question/245286

Hello!
   As a new Sikuli user I am having difficulty managing this region:

 Are you female: O Yes  O No

where O is a radio button.

I would like to be able to 
 determine if the Yes button is clicked
 given Yes is selected -> uncheck Yes button
 check No button

Is there a way to associated Yes/no with it's button?

Thanks 
HP

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp