Programmatic screen scraping for Functional Tester Extensions

The Rational Functional Tester Extension for Terminal based applications supports programmatic screen scraping. In earlier versions of Functional Tester Extensions, data verification on a terminal screen was performed only on fields, characters, or rows (virtual terminal). With programmatic screen scraping, data verification is performed on arbitrary locations. Programmatic screen scraping is used to scrape a portion of the terminal screen to determine whether the text is displayed at the specified position of the screen. Also, programmatic scraping makes the playback process wait to allow the text to appear on the screen. APIs are developed to support this feature.

These methods are used to extract information from a portion of the screen:

Methods Description
public void startEventMonitor() Collects the screen changes and stores the changes in a buffer
public boolean checkForChange(int startRow, int startCol, int endRow, int endCol, String text) Checks for the text at a particular position
public boolean checkForChange(int startRow, int startCol, int endRow, int endCol, String text, boolean clearBuffer) Checks for the text at a particular position, and then clears the buffer
public boolean waitForChange(int startRow, int startCol, int endRow, int endCol, String text) Waits for the text to be displayed in the specified position
public boolean waitForChange(int startRow, int startCol, int endRow, int endCol, String text, long timeout) Waits for the text to be displayed in the specified position at the specified time
clearHistory() Clears the buffer
public void stopEventMonitor() Stops collecting input from the screen