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 TableCell

    java.lang.Object
      |
      +--com.meterware.httpunit.ParsedHTML
            |
            +--com.meterware.httpunit.TableCell

All Implemented Interfaces:
  HTMLSegment

public class TableCell
extends ParsedHTML
implements HTMLSegment

A single cell in an HTML table.

Method Summary
`String` | `asText()` Returns the text value of this cell.
`int` | `getColSpan()` Returns the number of columns spanned by this cell.
`Node` | `getDOM()` Returns a copy of the domain object model associated with this HTML segment.
`WebForm[]` | `getForms()` Returns the forms found in the page in the order in which they appear.
`WebForm` | `getFormWithID(String ID)` Returns the form found in the page with the specified ID.
`WebForm` | `getFormWithName(String name)` Returns the form found in the page with the specified name.
`WebLink[]` | `getLinks()` Returns the links found in the page in the order in which they appear.
`WebLink` | `getLinkWith(String text)` Returns the first link which contains the specified text.
`WebLink` | `getLinkWithID(String ID)` Returns the link found in the page with the specified ID.
`WebLink` | `getLinkWithImageText(String text)` Returns the first link which contains an image with the specified text as its 'alt' attribute.
`WebLink` | `getLinkWithName(String name)` Returns the link found in the page with the specified name.
`int` | `getRowSpan()` Returns the number of rows spanned by this cell.
`WebTable[]` | `getTables()` Returns the top-level tables found in this page in the order in which they appear.
`WebTable` | `getTableStartingWith(String text)` Returns the first table in the response which has the specified text as the full text of its first non-blank row and non-blank column.
`WebTable` | `getTableStartingWithPrefix(String text)` Returns the first table in the response which has the specified text as a prefix of the text in its first non-blank row and non-blank column.
`WebTable` | `getTableWithID(String ID)` Returns the first table in the response which has the specified text as its ID attribute.
`WebTable` | `getTableWithSummary(String summary)` Returns the first table in the response which has the specified text as its summary attribute.
`protected void` | `setBaseTarget(String baseTarget)` Overrides the base target for this HTML segment.
`protected void` | `setBaseURL(URL baseURL)` Overrides the base URL for this HTML segment.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.meterware.httpunit.HTMLSegment
`getForms, getFormWithID, getFormWithName, getLinks, getLinkWith, getLinkWithImageText, getTables, getTableStartingWith, getTableStartingWithPrefix, getTableWithID, getTableWithSummary`

Method Detail

### getColSpan

    public int getColSpan()

  Returns the number of columns spanned by this cell.

### getRowSpan

    public int getRowSpan()

  Returns the number of rows spanned by this cell.

### asText

    public String asText()

  Returns the text value of this cell.

### getDOM

    public Node getDOM()

  Returns a copy of the domain object model associated with this HTML segment.
  Overrides:
    `getDOM` in class `ParsedHTML`

### getForms

    public WebForm[] getForms()

  Returns the forms found in the page in the order in which they appear.

### getFormWithID

    public WebForm getFormWithID(String ID)

  Returns the form found in the page with the specified ID.
  Throws:
    `SAXException` - thrown if there is an error parsing the response.

### getFormWithName

    public WebForm getFormWithName(String name)

  Returns the form found in the page with the specified name.
  Throws:
    `SAXException` - thrown if there is an error parsing the response.

### getLinks

    public WebLink[] getLinks()

  Returns the links found in the page in the order in which they appear.

### getLinkWith

    public WebLink getLinkWith(String text)

  Returns the first link which contains the specified text.

### getLinkWithImageText

    public WebLink getLinkWithImageText(String text)

  Returns the first link which contains an image with the specified text as its 'alt' attribute.

### getLinkWithID

    public WebLink getLinkWithID(String ID)

  Returns the link found in the page with the specified ID.
  Throws:
    `SAXException` - thrown if there is an error parsing the response.

### getLinkWithName

    public WebLink getLinkWithName(String name)

  Returns the link found in the page with the specified name.
  Throws:
    `SAXException` - thrown if there is an error parsing the response.

### getTables

    public WebTable[] getTables()

  Returns the top-level tables found in this page in the order in which they appear.

### getTableStartingWith

    public WebTable getTableStartingWith(String text)

  Returns the first table in the response which has the specified text as the full text of its first non-blank row and non-blank column. Will recurse into any nested tables, as needed.
  Returns:
    the selected table, or null if none is found

### getTableStartingWithPrefix

    public WebTable getTableStartingWithPrefix(String text)

  Returns the first table in the response which has the specified text as a prefix of the text in its first non-blank row and non-blank column. Will recurse into any nested tables, as needed.
  Returns:
    the selected table, or null if none is found

### getTableWithSummary

    public WebTable getTableWithSummary(String summary)

  Returns the first table in the response which has the specified text as its summary attribute. Will recurse into any nested tables, as needed.
  Returns:
    the selected table, or null if none is found

### getTableWithID

    public WebTable getTableWithID(String ID)

  Returns the first table in the response which has the specified text as its ID attribute. Will recurse into any nested tables, as needed.
  Returns:
    the selected table, or null if none is found

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### setBaseURL

    protected void setBaseURL(URL baseURL)

  Overrides the base URL for this HTML segment.

### setBaseTarget

    protected void setBaseTarget(String baseTarget)

  Overrides the base target for this HTML segment.

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