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 |
|---|---|
MatchResult |
matchWindow(Trigger[] userInputs,
EyesScreenshot lastScreenshot,
RegionProvider regionProvider,
String tag,
boolean shouldMatchWindowRunOnceOnTimeout,
boolean ignoreMismatch,
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)
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 matchprotected MatchResult performMatch(Trigger[] userInputs, AppOutputWithScreenshot appOutput, String tag, boolean ignoreMismatch)
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.public MatchResult matchWindow(Trigger[] userInputs, EyesScreenshot lastScreenshot, RegionProvider regionProvider, String tag, boolean shouldMatchWindowRunOnceOnTimeout, boolean ignoreMismatch, int retryTimeout)
userInputs - User input preceding this match.lastScreenshot - The last screenshot matched or
not ignored.regionProvider - Window region to capture.tag - Optional tag to be associated with
the match (can be null).shouldMatchWindowRunOnceOnTimeout - 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.retryTimeout - The amount of time to retry
matching in milliseconds or a
negative value to use the default
retry timeout.Copyright © 2017. All rights reserved.