version 1.0

com.actimind.actiwate.testing.html
Interface PageAssert

All Known Subinterfaces:
ActiwateSession, Frame, IFrame, Page, Window
All Known Implementing Classes:
ActiwateTestCase

public interface PageAssert

Contains asserts for HTML page as a whole.


Method Summary
 void assertImageWithURLNotPresent(java.lang.String imageURL)
          Asserts that page does not contain image with specified URL.
 void assertImageWithURLPresent(java.lang.String imageURL)
          Asserts that page contains image with specified URL.
 void assertLinkWithTextNotPresent(java.lang.String textInLink)
          Asserts that page does not contain link with specified text.
 void assertLinkWithTextPresent(java.lang.String textInLink)
          Asserts that link with specified text contained within this page.
 void assertTextNotPresent(java.lang.String notExpectedText)
          Asserts that page does not contain notExpectedText as substring.
 void assertTextPresent(java.lang.String expectedText)
          Asserts that page contains expectedText as substring.
 void assertTitleEquals(java.lang.String expectedTitle)
          Asserts that page has title equal to expectedTitle.
 

Method Detail

assertTitleEquals

public void assertTitleEquals(java.lang.String expectedTitle)
Asserts that page has title equal to expectedTitle. Page title will be normalized before comparing.

Parameters:
expectedTitle - title being expected on a page

assertTextPresent

public void assertTextPresent(java.lang.String expectedText)
Asserts that page contains expectedText as substring. Text in page will be normalized before comparing.

Parameters:
expectedText - text being expected on a page (within body element)

assertTextNotPresent

public void assertTextNotPresent(java.lang.String notExpectedText)
Asserts that page does not contain notExpectedText as substring. Text in page will be normalized before comparing.

Parameters:
notExpectedText - text NOT being expected on a page (within body element)

assertLinkWithTextPresent

public void assertLinkWithTextPresent(java.lang.String textInLink)
Asserts that link with specified text contained within this page. Text within link will be normalized before comparing.

Parameters:
textInLink - text searched link must have

assertLinkWithTextNotPresent

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

Parameters:
textInLink - text to search in link

assertImageWithURLPresent

public void assertImageWithURLPresent(java.lang.String imageURL)
Asserts that page 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 page 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


Copyright © 2007 Actimind, Inc. All Rights Reserved.