1

谁能建议我如何使用 xpath 按名称找到这个元素?

<button style="position: relative; width: 69px;" type="button" class="x-btn-text " tabindex="0">Search</button>
4

2 回答 2

0

您可以使用://button[text()='Search']

于 2012-10-29T15:24:59.657 回答
0

//button/text()应该返回您“搜索”。

于 2012-10-29T15:26:22.957 回答