Dear ranorex team,
I am developing some code to 'check/uncheck' a checkbox in a webpage of IE browser.
I notice when I try the following code:
dim chkbox as Ranorex.inputTag
chkbox = "<rx path of the checkbox>"
chkbox.checked = "False"
but the attribute <checked> of chkbox is always 'True', and there's no exception thrown if before run the code, I manually check the chkbox on the webpage
However, the following code work properly if I manuall clear the chkbox on the webpage before execute the code:
chkBox.Checked = "True"
Please advise.
thanks
set check state of an checkbox not working
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: set check state of an checkbox not working
Hi,
If you want to set an input-tag to "False", you have to set an empty string to the checked state.
Regards,
Peter
Ranorex Support Team
If you want to set an input-tag to "False", you have to set an empty string to the checked state.
chkbox = "<rx path of the checkbox>" chkbox.checked = ""We know it's a bit confusing but we cannot change it because of backwards compatibility. It will be changed with the next major release of Ranorex.
Regards,
Peter
Ranorex Support Team
Re: set check state of an checkbox not working
HI,
this is just to confirm that this is fixed with ranorex 2.3.2.
following code will reset checkbox 'checked' state.
this is just to confirm that this is fixed with ranorex 2.3.2.
following code will reset checkbox 'checked' state.
Code: Select all
dim chkbox as Ranorex.inputTag
chkbox = "<rx path of the checkbox>"
chkbox.checked = "False"