Rip*_*sim 2 java selenium xpath selenium-rc
我的应用程序有以下代码片段:
<form id="frmDepartmentCreation" name="frmDepartmentCreation" method="post"
action="">
<table class="formStyle_1" border="0" cellpadding="0" cellspacing="10"
width="100%">
<tr>
<td> </td>
<td align="left"><label class="formBtn_1">
<input id="Submit" name="Submit" value="Submit" type="submit"
onclick="return val()"/></label>
<input type="hidden" name="hdnbutton" id="hdnbutton" value=""/>
</td>
</tr>
</table>
</form>
Run Code Online (Sandbox Code Playgroud)
考虑到上面的代码,"提交"按钮的xpath是什么?
你不需要XPath,我不建议在这种情况下使用xpath.在这种情况下,id可以使用如下:
selenium.click("id=Submit");
Run Code Online (Sandbox Code Playgroud)
上面的代码可以做你想要的.
| 归档时间: |
|
| 查看次数: |
999 次 |
| 最近记录: |