【发布时间】:2017-07-16 18:34:54
【问题描述】:
我正在使用 codeception 来尝试在我的表单中单击、选择选项。问题是,当我尝试选中复选框时,它会选择隐私信息 href 链接,而不是我希望它选择的复选框。
<div class="row">
<div class="myclass">
<div class="mb">
<label class=" custom-checkbox"><input type="checkbox" id="from_accept" name="fform[accept]" class="custom-checkbox__input" value="1">
<span class="custom-checkbox__text">
::before
"I agree to terms "
<a href="[there is a link here]">terms and conditions</a>
"and some more text here "
<a href="[there is a link here]">privacy info</a>
"."
::after
</span>
</label>
</div>
</div>
</div>
我尝试过 Xpath 和 CSS 选择器,但没有成功,即使悬停也显示它只是最后一个 href 锚链接。
【问题讨论】:
-
你能给我们看看你的作品吗?谢谢
标签: selenium automation webdriver codeception