我的 HTML 看起来像这样:
<table summary="History of xxxxxx"><thead><tr><th>Date Started</th><th>Date Updated</th><th>Yyyyyyyy</th><th>Summary Report</th>
<th>Full Report</th></tr></thead><tbody><tr class="odd"><td>05/29/2012</td><td>05/29/2012</td>
<td><a href="/xxxxx/yyyyy/traversal/e3230f12-dea6-4fd9-b4ed-dd60deb65aa3">Complete </a>
<a href="/xxxxx/yyyyy/delete">Delete</a></td><td/><td/></tr><tr class="even"><td>05/29/2012</td>
<td>05/29/2012</td><td/><td><a href="/xxxxx/summaryreport/view/280e30fe-f7dc-4099-b83e-28e02d64f68f">View</a>
<a href="/xxxxx/summaryreport/save/280e30fe-f7dc-4099-b83e-28e02d64f68f">Save</a>
<a href="/xxxxx/summaryreport/print/280e30fe-f7dc-4099-b83e-28e02d64f68f">Print</a></td><td>
<a href="/xxxxx/fullreport/view/280e30fe-f7dc-4099-b83e-28e02d64f68f">View</a>
<a href="/xxxxx/fullreport/save/280e30fe-f7dc-4099-b83e-28e02d64f68f">Save</a>
<a href="/xxxxx/fullreport/print/280e30fe-f7dc-4099-b83e-28e02d64f68f">Print</a></td></tr></tbody></table>
我可以使用以下脚本片段打印表格的内容:
ITestDataTable kontents = (ITestDataTable) table_dateStartedDateUpdatedAs().getTestData("contentswithchildren");
System.out.println (table_dateStartedDateUpdatedAs().getTestDataTypes());
System.out.println ("Total Rows in table : " + kontents.getRowCount());
System.out.println ("Total Cols in table : " + kontents.getColumnCount());
for (int row=0; row < kontents.getRowCount();++row)
{
for (int col=0; col < kontents.getColumnCount();++col)
{
System.out.println("contents("+row+","+col+")=\""+kontents.getCell(row,col)+"\"");
}
}
但是我怎样才能将超链接放入它们自己的变量中呢?三个超链接 View Save Print 都在一个单元格中。
- 谢谢,
——小迈克