这是html行元素:
<tr style="display:none">
<td>23</td>
<td class="mandatory">
Overall Percentage
</td>
<td>
50
</td>
</tr>
String overallProgress = driver.findElement(By.xpath("//*[@id=\"DivBuilding\"]/div/table/tbody/tr[4]/td[2]/table/tbody/tr[23]/td[3]")).getText();
这不起作用。我理解findElement只获取可见数据,我该如何解决这个问题?
我的HTML如下所示:
<tr style="display:none"> <td>11</td> <td class="mandatory"> Overall Percentage of Completion of the work done For the entire Building /Wing </td> <td> 31.5 </td> </tr>
我想从上面的
获得数字“31.5”