使用这些方法来抽取屏幕部分中的信息:
方法 | 描述 |
---|---|
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() | 停止从屏幕中收集输入 |