小编Vik*_*kas的帖子

如何从HTML表格的每个单元格中获取文本?

在Selenium 2.0中,我不知道如何遍历网页中的HTML表格.在selenium2.0 javadoc中,我找到了两个类"TableFinder"和"TableCellFinder",但我找不到任何示例.

我想做这样的事情:

RowCount=Get how many rows are there in the html table

for each row of the table
{
   column_count=Get column count
   for each column
   {
      cell_value=get_text_from(row,col);
      Do something with cell_value
   }
}
Run Code Online (Sandbox Code Playgroud)

如何从每个表格单元格中获取文本?

selenium selenium-webdriver

25
推荐指数
2
解决办法
14万
查看次数

标签 统计

selenium ×1

selenium-webdriver ×1