public class HtmlTable extends Object
This is basically a wrapper around the low-level WebTable.
WebTable
Modifier and Type | Class and Description |
---|---|
class |
HtmlTable.Row |
Constructor and Description |
---|
HtmlTable(com.meterware.httpunit.WebTable webTable) |
Modifier and Type | Method and Description |
---|---|
boolean |
doesCellHaveText(int row,
int col,
String text)
Method that checks if a particular table cell contains the text specified.
|
HtmlTable.Row |
findRowWhereCellEquals(int columnIndex,
String cellValue)
Finds the first row in this HtmlTable where the text in the given column equals
cellValue . |
HtmlTable.Row |
findRowWhereCellStartsWith(int columnIndex,
String prefix)
Finds the first row in this HtmlTable where the text in the given column starts with
prefix . |
List<String> |
getHeadingList() |
HtmlTable.Row |
getRow(int rowIndex) |
int |
getRowCount() |
List<HtmlTable.Row> |
getRows() |
static HtmlTable |
newHtmlTable(net.sourceforge.jwebunit.WebTester tester,
String tableID) |
public static HtmlTable newHtmlTable(net.sourceforge.jwebunit.WebTester tester, String tableID)
public HtmlTable.Row getRow(int rowIndex)
public List<HtmlTable.Row> getRows()
public HtmlTable.Row findRowWhereCellEquals(int columnIndex, String cellValue)
cellValue
.
Note that we trim the whitespace from the beginning and end of the cell value.
columnIndex
- Index of the column that we are looking in for the given text.cellValue
- The text we expect the cell to contain.public HtmlTable.Row findRowWhereCellStartsWith(int columnIndex, String prefix)
prefix
.
Note that we trim the whitespace from the beginning and end of the cell value.
columnIndex
- Index of the column that we are looking in for the given prefix.prefix
- The prefix.public boolean doesCellHaveText(int row, int col, String text)
row
- the row indexcol
- the column indextext
- the text to check forpublic int getRowCount()
Copyright © 2002-2022 Atlassian. All Rights Reserved.