Identify Checkboxes value

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 19
Joined: Wed Jul 20, 2016 1:18 pm

Identify Checkboxes value

Post by Juan » Wed Jul 20, 2016 1:45 pm

Hi I have this scenario to test:
Scenario.png (4.58 KiB) Viewed 1428 times
I use my code to identify the checkbox but I don't know how to test its value. Spy detects same attributes in both cases
Checkbox_unchecked.png (84.56 KiB) Viewed 1428 times
Checkbox_checked.png (86.59 KiB) Viewed 1428 times
This is how I click a checkbox

Code: Select all

//Receive the div container where the checkbox label is
 private void CheckBoxValue(WebElement checkBox)
            IList<LabelTag> inners = checkBox.FindDescendants<LabelTag>();
            foreach (LabelTag label in inners)
                if (label.Class == "k-checkbox-label")
Any ideas of how to check the values? Thanks in advance

User avatar
Support Team
Site Admin
Site Admin
Posts: 12169
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Identify Checkboxes value

Post by Support Team » Thu Jul 21, 2016 1:24 pm

Hello Juan,

It seems both label tags have the same class name value. Maybe it is better to use another property. Please post a Ranorex Snapshot file. This will help us analyzing the issue in more detail.

Thank you.