Selenium IDE 无法识别复选框
Selenium IDE not able to recognize Checkboxes
通过 Firefox Selenium IDE 记录,无法捕获复选框。我该怎么做,下面是复选框
的 属性
span class="userAgreement">
<input id="ctl_ctl_MainContent_MainContent_Agreement" name="ctl$ctl$MainContent$MainContent$Agreement"
tabindex="39" type="checkbox">
<label for="ctl_ctl_MainContent_MainContent_Agreement">
您只需要对输入元素使用点击命令
<tr>
<td>click</td>
<td>id=ctl_ctl_MainContent_MainContent_Agreement</td>
<td></td>
</tr>
使用下面的代码选中复选框。
document.getElementById("ctl_ctl_MainContent_MainContent_Agreement").checked = true;
通过 Firefox Selenium IDE 记录,无法捕获复选框。我该怎么做,下面是复选框
的 属性span class="userAgreement">
<input id="ctl_ctl_MainContent_MainContent_Agreement" name="ctl$ctl$MainContent$MainContent$Agreement"
tabindex="39" type="checkbox">
<label for="ctl_ctl_MainContent_MainContent_Agreement">
您只需要对输入元素使用点击命令
<tr>
<td>click</td>
<td>id=ctl_ctl_MainContent_MainContent_Agreement</td>
<td></td>
</tr>
使用下面的代码选中复选框。
document.getElementById("ctl_ctl_MainContent_MainContent_Agreement").checked = true;