version 1.0

com.actimind.actiwate.testing.html
Interface TableCellAssert

All Known Subinterfaces:
TableCell

public interface TableCellAssert

Contains asserts for TableCell content.


Field Summary
static int ABOVE_CELL
          All cells above the current cell in the same column.
static int BELOW_CELL
          All cells below the current cell in the same column.
static int ON_THE_LEFT
          All cells on the left of the current cell in the same row.
static int ON_THE_RIGHT
          All cells on the right of the current cell in the same row.
 
Method Summary
 void assertCellWithTextExist(java.lang.String expectedText, int direction)
          Asserts that at specified direction there is a table cell having specified text.
 void assertImageWithURLNotPresent(java.lang.String imageURL)
          Asserts that table cell does not contain image with specified URL.
 void assertImageWithURLPresent(java.lang.String imageURL)
          Asserts that table cell contains image with specified URL.
 void assertLinkWithTextNotPresent(java.lang.String textInLink)
          Asserts that cell does not contain link with specified text.
 void assertLinkWithTextPresent(java.lang.String textInLink)
          Asserts that cell contains link with specified text.
 void assertTextEquals(java.lang.String expectedText)
          Asserts that cell has specified text.
 void assertTextNotPresent(java.lang.String notExpectedText)
          Asserts that cell does not contain notExpectedText as substring.
 void assertTextPresent(java.lang.String expectedText)
          Asserts that cell contains expectedText as substring.
 

Field Detail

ON_THE_RIGHT

public static final int ON_THE_RIGHT
All cells on the right of the current cell in the same row.

See Also:
Constant Field Values

ON_THE_LEFT

public static final int ON_THE_LEFT
All cells on the left of the current cell in the same row.

See Also:
Constant Field Values

ABOVE_CELL

public static final int ABOVE_CELL
All cells above the current cell in the same column.

See Also:
Constant Field Values

BELOW_CELL

public static final int BELOW_CELL
All cells below the current cell in the same column.

See Also:
Constant Field Values
Method Detail

assertTextPresent

public void assertTextPresent(java.lang.String expectedText)
Asserts that cell contains expectedText as substring. Table cell's text will be normalized before comparing.

Parameters:
expectedText - text expected to be in this cell.

assertTextNotPresent

public void assertTextNotPresent(java.lang.String notExpectedText)
Asserts that cell does not contain notExpectedText as substring. Table cell's text will be normalized before comparing.

Parameters:
notExpectedText - text not expected to be in this cell.

assertTextEquals

public void assertTextEquals(java.lang.String expectedText)
Asserts that cell has specified text. Text in the cell will be normalized before comparing.

Parameters:
expectedText - text expected to be in table cell

assertLinkWithTextPresent

public void assertLinkWithTextPresent(java.lang.String textInLink)
Asserts that cell contains link with specified text. Text within link will be normalized before assertion.

Parameters:
textInLink - text to search in link

assertLinkWithTextNotPresent

public void assertLinkWithTextNotPresent(java.lang.String textInLink)
Asserts that cell does not contain link with specified text. Text within link will be normalized before assertion.

Parameters:
textInLink - text to search in link

assertImageWithURLPresent

public void assertImageWithURLPresent(java.lang.String imageURL)
Asserts that table cell contains image with specified URL. Argument url can be absolute or relative. If url is relative absolute url will be constructed from the base URL of the test.

Image location will be calculated from location of the current page and value specified in image src attribute (if src contains servlet session id - it will be ignored).

Parameters:
imageURL - absolute or relative url of searched image

assertImageWithURLNotPresent

public void assertImageWithURLNotPresent(java.lang.String imageURL)
Asserts that table cell does not contain image with specified URL. Argument url can be absolute or relative. If url is relative absolute url will be constructed from the base URL of the test.

Image location will be calculated from location of the current page and value specified in image src attribute (if src contains servlet session id - it will be ignored).

Parameters:
imageURL - absolute or relative url of searched image

assertCellWithTextExist

public void assertCellWithTextExist(java.lang.String expectedText,
                                    int direction)
Asserts that at specified direction there is a table cell having specified text. Direction parameter can be one of the ON_THE_RIGHT, ON_THE_LEFT, ABOVE_CELL or BELOW_CELL.

WARNING: this method does not take into account colspan and rowspan attributes. For example, if there is a cell with rowspan = 2 and this cell was placed in the row above current cell's row, then assert will ignore this cell. The same is for colspan attribute.

Parameters:
expectedText - text expected to be in the cell.
direction - direction where to search for table cell. Can be one of ON_THE_RIGHT, ON_THE_LEFT, ABOVE_CELL or BELOW_CELL.


Copyright © 2007 Actimind, Inc. All Rights Reserved.