public class MatchWindowTask extends Object
| Modifier and Type | Field and Description |
|---|---|
protected AppOutputProvider |
appOutputProvider |
protected EyesBase |
eyes |
protected Logger |
logger |
protected MatchResult |
matchResult |
protected RunningSession |
runningSession |
protected IServerConnector |
serverConnector |
| Modifier | Constructor and Description |
|---|---|
protected |
MatchWindowTask() |
|
MatchWindowTask(Logger logger,
IServerConnector serverConnector,
RunningSession runningSession,
int retryTimeout,
EyesBase eyes) |
|
MatchWindowTask(Logger logger,
IServerConnector serverConnector,
RunningSession runningSession,
int retryTimeout,
EyesBase eyes,
AppOutputProvider appOutputProvider) |
| Modifier and Type | Method and Description |
|---|---|
ImageMatchSettings |
createImageMatchSettings(ICheckSettingsInternal checkSettingsInternal,
EyesScreenshot screenshot)
Build match settings by merging the check settings and the default match settings.
|
Region |
getLastScreenshotBounds() |
MatchResult |
matchWindow(Trigger[] userInputs,
Region region,
String tag,
boolean shouldRunOnceOnTimeout,
boolean ignoreMismatch,
ICheckSettingsInternal checkSettingsInternal,
int retryTimeout)
Repeatedly obtains an application snapshot and matches it with the next
expected output, until a match is found or the timeout expires.
|
MatchResult |
performMatch(Trigger[] userInputs,
AppOutputWithScreenshot appOutput,
String tag,
boolean ignoreMismatch,
ImageMatchSettings imageMatchSettings)
Creates the match model and calls the server connector matchWindow method.
|
protected Logger logger
protected IServerConnector serverConnector
protected RunningSession runningSession
protected AppOutputProvider appOutputProvider
protected MatchResult matchResult
protected EyesBase eyes
protected MatchWindowTask()
public MatchWindowTask(Logger logger, IServerConnector serverConnector, RunningSession runningSession, int retryTimeout, EyesBase eyes, 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).eyes - An EyesBase object.appOutputProvider - A callback for getting the application output when performing match.public MatchWindowTask(Logger logger, IServerConnector serverConnector, RunningSession runningSession, int retryTimeout, EyesBase eyes)
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).public 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, ICheckSettingsInternal checkSettingsInternal, 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.checkSettingsInternal - 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 ImageMatchSettings createImageMatchSettings(ICheckSettingsInternal checkSettingsInternal, EyesScreenshot screenshot)
checkSettingsInternal - the settings to match the image by.screenshot - the Screenshot wrapper object.public Region getLastScreenshotBounds()
Copyright © 2019. All rights reserved.