Functional Tester 扩展的程序化屏幕抓取

基于终端的应用程序的 Rational Functional Tester 扩展支持程序化的屏幕抓取。在早期版本的 Functional Tester 扩展中,只在字段、字符或行(虚拟终端)上执行终端屏幕上的数据验证。 使用程序化的屏幕抓取,可以在任意位置上执行数据验证。使用程序化屏幕抓取来抓取部分终端屏幕,以确定是否在指定的屏幕位置上显示文本。另外,使用程序化抓取,回放进程等待屏幕上允许显示文本。已开发支持此功能的 API。

使用这些方法来抽取屏幕部分中的信息:

方法 描述
public void startEventMonitor() 收集屏幕更改,并在缓冲区中存储更改
public boolean checkForChange(int startRow, int startCol, int endRow, int endCol, String text) 检查特定位置上的文本
public boolean checkForChange(int startRow, int startCol, int endRow, int endCol, String text, boolean clearBuffer) 检查特定位置上的文本,然后清除缓冲区
public boolean waitForChange(int startRow, int startCol, int endRow, int endCol, String text) 等待在指定位置上显示文本
public boolean waitForChange(int startRow, int startCol, int endRow, int endCol, String text, long timeout) 等待在指定时间、指定位置上显示文本
clearHistory() 清除缓冲区
public void stopEventMonitor() 停止从屏幕中收集输入

反馈