大家好,
我有一个HTML表单,其中的标签带有复选框选项,但也有"a"标签,因此使用XPath而不是单击复选框,而是单击附加到该标签的链接
HTML元素
我有一个HTML表单,其中的标签带有复选框选项,但也有"a"标签,因此使用XPath而不是单击复选框,而是单击附加到该标签的链接
HTML元素
HTML Element:
<div class="form-group">
<label for="chkTermAndCondition">
I have read and agree to the
<a id="lnkTermsAndCondition" href="javascrip:void(0);">terms and conditions.</a>
</label>
</div>
XPath tried:
//*[@for='chkTermAndCondition'] - clicks on link of "a" tag
//div[@id='sellerInformationDiv']/div[3]/div/label - clicks on link of "a" tag