Retrieve the value of checkbox linked to a label
I am testing a web application that has a Remember me checkbox. I would like to the script to set the value of the checkbox to true every time it runs, however the checkbox true/false value cannot be read as TC identified the checkbox and the label associated a one object identified by a "//label[contains(@class, 'checked')]" selector.
Is there anyway I could interact with the checkbox instead of the label? The spy is unable to identify the checkbox.
Thanks.
Hi,
Most probably, developers implemented label styled as checkbox.
Check either page markup or talk to developers to double-check this.
Checkbox markup element will obviously be absent on the page and thus there will be no way for TestComplete to find it if the entity that looks like a checkbox is implemented as styled label.