Page 1 of 1

how to get the 'checked' state of a checkbox or radio button

Posted: Wed May 19, 2010 7:01 am
by hobli
Hi,

I am writing some code to check if a checkbox/radiobutton on a webpage is in checked state.
Here's the html code:
<input type="checkbox" name="chkbox name" value="chkbox 1 value" id="chkbox1">

Pls be noted that the attribute of "checked" is not defined in html.
when I tried with following code:
Dim chkBox as InputTag
chkBox = <rx path of the webelement>
Dim state as string
state = chkBox.Checked
It always return null.

is that correct? how to retrieve the run-time check state of the inputTag?

I am using ranorex studio 2.3

thanks

Re: how to get the 'checked' state of a checkbox or radio button

Posted: Wed May 19, 2010 11:39 am
by Support Team
Hi!
hobli wrote:is that correct? how to retrieve the run-time check state of the inputTag?
Yes you wrote the correct code. But at the moment this only works with Internet Explorer. We found a bug in the Firefox Add-on about this behavior. This bug fix will be released with the next Ranorex Version.

Thanks for posting the bug.

Regards,
Peter
Ranorex Support Team

Re: how to get the 'checked' state of a checkbox or radio button

Posted: Wed May 19, 2010 2:55 pm
by hobli
Hi, ranorex team,

thanks for your prompt reply. May I know when the next release with this bug fix will be available? As we are going to test web application for both IE and firefox, this bug will be quite important to us.

thanks

Re: how to get the 'checked' state of a checkbox or radio button

Posted: Thu May 20, 2010 9:29 am
by Support Team
Hi,
hobli wrote:May I know when the next release with this bug fix will be available?
The next service release will be released in June. But I cannot provide you with an exact date.

Regards,
Peter
Ranorex Support Team

Re: how to get the 'checked' state of a checkbox or radio button

Posted: Fri May 21, 2010 8:59 am
by hobli
Hi,

that's fine enough. thanks

Re: how to get the 'checked' state of a checkbox or radio button

Posted: Tue Jul 06, 2010 3:13 am
by hobli
hi,

this is just to confirm that this bug is fixed with ranorex 2.3.2.

checked state of inputTag can now be properly retrieved with FireFox and IE.