【发布时间】:2014-09-11 19:47:44
【问题描述】:
无法使用 Xpath 定位元素.. xpath = //label[contains(text(),'Create a guest user')]
HTML源代码:
<html>
<table class="formTable">
<tbody>
<tr class="formHeader">
<tr>
<td class="contentcell">
<label>
<input type="checkbox" checked="" value="1" name="Asset28"/>
Create a guest user
</label>
</td>
</tr>
</tbody>
</table>
</html>
【问题讨论】:
-
如果您可以使用 id 属性来唯一标识您的元素,那就太好了。
标签: javascript jquery html selenium xpath