com.meterware.httpunit
Class WebTable

java.lang.Object
  |
  +--com.meterware.httpunit.WebTable

public class WebTable
extends java.lang.Object

This class represents a table in an HTML page.


Method Summary
 java.lang.String[][] asText()
          Returns a rendering of the table with all cells converted to text.
 java.lang.String getCell(int row, int column)
          Deprecated. use #getCellAsText
 java.lang.String getCellAsText(int row, int column)
          Returns the contents of the specified table cell as text.
 int getColumnCount()
          Returns the number of columns in the table.
 int getRowCount()
          Returns the number of rows in the table.
 TableCell getTableCell(int row, int column)
          Returns the contents of the specified table cell as text.
 void purgeEmptyCells()
          Removes all rows and all columns from this table which have no visible text in them.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getRowCount

public int getRowCount()
Returns the number of rows in the table.

getColumnCount

public int getColumnCount()
Returns the number of columns in the table.

getCell

public java.lang.String getCell(int row,
                                int column)
Deprecated. use #getCellAsText

Returns the contents of the specified table cell as text. The row and column numbers are zero-based.
Throws:
IndexOutOfBoundsException - if the specified cell numbers are not valid

getCellAsText

public java.lang.String getCellAsText(int row,
                                      int column)
Returns the contents of the specified table cell as text. The row and column numbers are zero-based.
Throws:
IndexOutOfBoundsException - if the specified cell numbers are not valid

getTableCell

public TableCell getTableCell(int row,
                              int column)
Returns the contents of the specified table cell as text. The row and column numbers are zero-based.
Throws:
IndexOutOfBoundsException - if the specified cell numbers are not valid

purgeEmptyCells

public void purgeEmptyCells()
Removes all rows and all columns from this table which have no visible text in them.

asText

public java.lang.String[][] asText()
Returns a rendering of the table with all cells converted to text.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object