【发布时间】:2020-12-24 08:40:36
【问题描述】:
我正在尝试使用 xpath 计算下表中的 tr 标签行数:
<table class="table">
<tbody>
<tr>...
<tr>...
<tr>...
<tr>...
</tbody>
</table>
我尝试了以下但它没有给我 4 作为结果。任何人都可以帮助我吗?谢谢。
xpath=//*[@class='table']/tbody//tr
【问题讨论】:
-
请在此处添加您尝试过的javascript代码?
-
嘿@moufed,我只需要xpath函数,因为我使用selenium ide 3
-
//table[@class='table']//tr会为你做的很好。
标签: javascript java html selenium automation