我们有 2 个具有几乎相同属性的单选按钮,但 xpath 属性的组合似乎都不起作用。请帮忙。下面是添加的 HTML 代码。
单选按钮 1:
<label class="label_radio r_off"><input kdfid="flowSelection" kdfapp="order" kdfpage="createOrder" type="radio" id="flowSelection" class="orderWithDealId" name="flowSelection" value="false" onclick="javascript:icw.singleEntry.flowSelection('deal');" checked="true" tabindex="1"></label>
<span class="radioTxt">With a Deal ID</span>
单选按钮 2:
<label class="label_radio r_on"><input kdfid="flowSelectionnew" kdfapp="order" kdfpage="createOrder" type="radio" id="flowSelectionnew" name="flowSelection" class="orderWithNoDealId" value="true" onclick="javascript:icw.singleEntry.flowSelection('noDeal');" tabindex="1"></label>
<span class="radioTxt">Without a Deal ID</span>
请帮忙。
最佳答案
关于java - 在selenium中选择具有几乎相同属性的单选按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60500293/