Capybara单选按钮不可选择

时间:2016-11-13 20:05:51

标签: ruby capybara

对于下面的元素html代码我试过多种方式,单选按钮根本不可选择。有人可以帮忙吗

<fieldset class="usa-fieldset-inputs usa-sans">
<input type="radio" name="certificate_type" id="idvalue" value="xx">
<label for="add_certificate">xxxx<a href="../prepare#xx-anc" target="_blank">(Review requirements)</a>
</label>
<input type="radio" name="certificate_type" id="ddddd" value="xxx">
<label for="add_certificate">xxxxx <a href="../prepare#xxx-anc" target="_blank">(Review requirements)</a>
</label>

尝试以下所有

choose("certificate_type")
choose("idvalue")
page.find(:xpath, '//*[@id="idvalue"]').click
and other xpaths also. Xpath seems to be good.

0 个答案:

没有答案