【发布时间】:2025-12-12 04:55:02
【问题描述】:
<table class="shoppingCart" cellspacing="0" cellpadding="0" border="0" width="100%">
<thead>
<tfoot>
<tr>
<tr>
<tr>
<!-- show if promo discount applied -->
<!-- end discount -->
<tr>
<td/>
<td/>
<th scope="row" colspan="2">Order total</th>
<td class="total ajaxCart_total"> $284.96 </td>
</tr>
</tfoot>
<tbody>
</table>
有人可以帮我解决这个问题吗? 我想在运行时捕获文本 $284.96。而且我不想使用绝对 Xpath(//table/tfoot/tr[4]/td[3]) 因为页面是动态的并且 Xpath 可能经常更改。 我怎么能做到这一点?
提前致谢, 迈克
【问题讨论】:
标签: java selenium automation automated-tests selenium-webdriver