Method getLabel of CheckBox class uses following xpath following-sibling::label to find label, associated with a checkbox. However in most cases this would find wrong label, that even don't belong to that checkbox.
Sample problematic markup:
<input type="checkbox" id="checkbox-without-label">
<input type="checkbox" id="checkbox-with-label"><label for="checkbox-with-label">Checkbox Label</label>
I think, that we either should find the "label" that placed right after a checkbox or use "for" attribute of label to match with "id" attribute of checkbox.
Of course following case still won't be covered:
<label><input type="checkbox"> label text</label>
Method
getLabelofCheckBoxclass uses following xpathfollowing-sibling::labelto find label, associated with a checkbox. However in most cases this would find wrong label, that even don't belong to that checkbox.Sample problematic markup:
I think, that we either should find the "label" that placed right after a checkbox or use "for" attribute of label to match with "id" attribute of checkbox.
Of course following case still won't be covered: