public class MatchWindowTask extends Object
| Constructor and Description |
|---|
MatchWindowTask(Logger logger,
ServerConnector serverConnector,
RunningSession runningSession,
int retryTimeout,
AppOutputProvider appOutputProvider) |
| Modifier and Type | Method and Description |
|---|---|
Region |
getLastScreenshotBounds() |
MatchResult |
matchWindow(Trigger[] userInputs,
Region region,
String tag,
boolean shouldRunOnceOnTimeout,
boolean ignoreMismatch,
ImageMatchSettings imageMatchSettings,
int retryTimeout)
Repeatedly obtains an application snapshot and matches it with the next
expected output, until a match is found or the timeout expires.
|
protected MatchResult |
performMatch(Trigger[] userInputs,
AppOutputWithScreenshot appOutput,
String tag,
boolean ignoreMismatch,
ImageMatchSettings imageMatchSettings)
Creates the match data and calls the server connector matchWindow method.
|
public MatchWindowTask(Logger logger, ServerConnector serverConnector, RunningSession runningSession, int retryTimeout, AppOutputProvider appOutputProvider)
logger - A logger instance.serverConnector - Our gateway to the agentrunningSession - The running session in which we should match the windowretryTimeout - The default total time to retry matching (ms).appOutputProvider - A callback for getting the application output when performing match.protected MatchResult performMatch(Trigger[] userInputs, AppOutputWithScreenshot appOutput, String tag, boolean ignoreMismatch, ImageMatchSettings imageMatchSettings)
userInputs - The user inputs related to the current appOutput.appOutput - The application output to be matched.tag - Optional tag to be associated with the match (can be null).ignoreMismatch - Whether to instruct the server to ignore the match attempt in case of a mismatch.imageMatchSettings - The settings to use.public MatchResult matchWindow(Trigger[] userInputs, Region region, String tag, boolean shouldRunOnceOnTimeout, boolean ignoreMismatch, ImageMatchSettings imageMatchSettings, int retryTimeout)
userInputs - User input preceding this match.region - Window region to capture.tag - Optional tag to be associated with the match (can be null).shouldRunOnceOnTimeout - Force a single match attempt at the end of the match timeout.ignoreMismatch - Whether to instruct the server to ignore the match attempt in case of a mismatch.imageMatchSettings - The settings to use.retryTimeout - The amount of time to retry matching in milliseconds or a
negative value to use the default retry timeout.public Region getLastScreenshotBounds()
Copyright © 2017. All rights reserved.