Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.meterware.httpunit
Class WebTable

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

public class WebTable
extends Object

This class represents a table in an HTML page.

Author:
  Russell Gold, Benoit Xhenseval

Method Summary
`String[][]` | `asText()` Returns a rendering of this table with all cells converted to text.
`String` | `getCell(int row, int column)` Deprecated. use #getCellAsText
`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.
`String` | `getID()` Returns the unique ID attribute associated with this table.
`int` | `getRowCount()` Returns the number of rows in the table.
`String` | `getSummary()` Returns the summary attribute associated with this table.
`TableCell` | `getTableCell(int row, int column)` Returns the contents of the specified table cell as text.
`TableCell` | `getTableCellWithID(String id)` Returns the contents of the specified table cell with a given ID
`void` | `purgeEmptyCells()` Removes all rows and all columns from this table which have no visible text in them.
`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 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 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

### getTableCellWithID

    public TableCell getTableCellWithID(String id)

  Returns the contents of the specified table cell with a given ID
  Returns:
    TableCell with given ID or null if ID is not found.

### purgeEmptyCells

    public void purgeEmptyCells()

  Removes all rows and all columns from this table which have no visible text in them.

### asText

    public String[][] asText()

  Returns a rendering of this table with all cells converted to text.

### getSummary

    public String getSummary()

  Returns the summary attribute associated with this table.

### getID

    public String getID()

  Returns the unique ID attribute associated with this table.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD