how to get the 'checked' state of a checkbox or radio button
Posted: Wed May 19, 2010 7:01 am
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
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