【发布时间】:2012-08-16 22:21:50
【问题描述】:
我在 HTML 中有以下表格布局(相应更改):
<table class="other-table-style">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Age</th>
</tr>
<tr>
<td align="center" width="30%">Joe</td>
<td align="center" width="30%">Bloggs</td>
<td align="center" width="40%">28</td>
</tr>
<tr>
<td align="center" width="30%">John</td>
<td align="center" width="30%">Doe</td>
<td align="center" width="40%">30</td>
</tr>
</table>
我希望能够使用 Selenium 2.0 WebDriver 进行迭代,但我找不到任何好的示例。
任何帮助将不胜感激。
【问题讨论】:
-
你试过什么?看看
find_elements_by*()methods。 -
我正在尝试使用 find_elements_by_xpath,但我没有得到任何回报。我已经在桌子上试过了,效果很好。
标签: python selenium selenium-webdriver html-table