com.atlassian.jira.webtests.table
Class HtmlTable

java.lang.Object
  extended by com.atlassian.jira.webtests.table.HtmlTable

public class HtmlTable
extends Object

Represents a HTML table found on a page in a test. This is basically a wrapper around the low-level WebTable.

Since:
v4.0
See Also:
WebTable

Nested Class Summary
 class HtmlTable.Row
           
 
Constructor Summary
HtmlTable(com.meterware.httpunit.WebTable webTable)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlTable

public HtmlTable(com.meterware.httpunit.WebTable webTable)
Method Detail

newHtmlTable

public static HtmlTable newHtmlTable(net.sourceforge.jwebunit.WebTester tester,
                                     String tableID)

getRow

public HtmlTable.Row getRow(int rowIndex)

getRows

public List<HtmlTable.Row> getRows()

findRowWhereCellEquals

public HtmlTable.Row findRowWhereCellEquals(int columnIndex,
                                            String cellValue)
Finds the first row in this HtmlTable where the text in the given column equals cellValue.

Note that we trim the whitespace from the beginning and end of the cell value.

Parameters:
columnIndex - Index of the column that we are looking in for the given text.
cellValue - The text we expect the cell to contain.
Returns:
the first such row found, or null if none found.

findRowWhereCellStartsWith

public HtmlTable.Row findRowWhereCellStartsWith(int columnIndex,
                                                String prefix)
Finds the first row in this HtmlTable where the text in the given column starts with prefix.

Note that we trim the whitespace from the beginning and end of the cell value.

Parameters:
columnIndex - Index of the column that we are looking in for the given prefix.
prefix - The prefix.
Returns:
the first such row found, or null if none found.

doesCellHaveText

public boolean doesCellHaveText(int row,
                                int col,
                                String text)
Method that checks if a particular table cell contains the text specified.

Parameters:
row - the row index
col - the column index
text - the text to check for
Returns:
Returns true if the text is contained in the table cell specified.

getRowCount

public int getRowCount()

getHeadingList

public List<String> getHeadingList()


Copyright © 2002-2014 Atlassian. All Rights Reserved.