请提供以下xpath:

时间:2014-07-24 10:16:56

标签: xpath uniqueidentifier

此对象的xpath应该是什么?

<td id="searchButtonCol">
    <input id="ctl00_m_EmployeeDirectoryEmployee Directory_ctl00_btnSearch"
           type="submit"
           onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$m$EmployeeDirectoryEmployee Directory$ctl00$btnSearch", "", true, "", "", false, false))"
           value="Search"
           name="ctl00$m$EmployeeDirectoryEmployee Directory$ctl00$btnSearch">
</td>

1 个答案:

答案 0 :(得分:1)

查看XPath 1.0文档,the id() function

对于<td>元素,请执行

id('searchButtonCol')

对于<input>元素,请执行

id('ctl00_m_EmployeeDirectoryEmployee Directory_ctl00_btnSearch')