My HTML looks like:
<label class="btn-radio ">
<input type="radio" value="1" name="pens" class="input_normal">
<span></span>Yes
</label>
...
In my codeception test I try to set radio control:
$I->selectOption("//*[@name=pens]/ancestor::label", "1");
but it fails with error:
"Couldn't select option "//*[@name='pens' and @value='1']/ancestor::label","1": ElementNotVisibleException: element not visible".
When I remove the wrapping tags then it works, but UI is ruined. Has anyone encountered this problem before?
</div>