Hi,
I'm using Ranorex version 2.3.5.10317 and am running into a problem with checkboxes.
I have a custom gridview control that is filled with checkboxes. I use the code below to iterate through the checkboxes and set the check state. However the it keeps randomly failing with an "operation not supported" message.
I see no reason for it to fail on any of the checkboxes. Does anybody have any suggestions?
Thanks
foreach(Ranorex.CheckBox box in list)
{
if(box.Checked)
{
fail = false;
Report.Error("checked boxes found");
return fail;
}
box.CheckState = CheckState.Checked;
}
CheckState.Checked ??
Re: CheckState.Checked ??
Obligatory, obvious question... Does each checkbox have a valid checked and checkstate property?
Wrap your code in a try/catch and catch the full exception to see what is happening.
Possibly the checkbox is of state indeterminate and the Ranorex checkbox is not liking getting set to indeterminate?
Just some shots in the dark here....
Wrap your code in a try/catch and catch the full exception to see what is happening.
Possibly the checkbox is of state indeterminate and the Ranorex checkbox is not liking getting set to indeterminate?
Just some shots in the dark here....
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: CheckState.Checked ??
Maybe some of them are disabled and setting CheckState is not supported on them?
Maybe the list contains elements other than Checkboxes?
Maybe the list contains elements other than Checkboxes?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: CheckState.Checked ??
Hi,
Anyway, can you please send us a snapshot of your application under test.
Therefore, please take a look to following link:
http://www.ranorex.com/support/user-gui ... html#c2072
Or, even better, can you send us a sample application with this behaviour.
This will make it much easier to determine your issue.
You can either reply on this post with the attached files or send us the files to [email protected].
Kind regards,
Tobias
Support Team
This is also my guess.artur_gadomski wrote:Maybe some of them are disabled and setting CheckState is not supported on them?
Anyway, can you please send us a snapshot of your application under test.
Therefore, please take a look to following link:
http://www.ranorex.com/support/user-gui ... html#c2072
Or, even better, can you send us a sample application with this behaviour.
This will make it much easier to determine your issue.
You can either reply on this post with the attached files or send us the files to [email protected].
Kind regards,
Tobias
Support Team