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 ServerConnector |
serverConnector |
| Constructor and Description |
|---|
MatchWindowTask(Logger logger,
ServerConnector serverConnector,
RunningSession runningSession,
int retryTimeout,
EyesBase eyes,
AppOutputProvider appOutputProvider) |
| Modifier and Type | Method and Description |
|---|---|
static void |
collectRegions(ImageMatchSettings imageMatchSettings,
ICheckSettingsInternal checkSettingsInternal) |
static void |
collectRegions(ImageMatchSettings imageMatchSettings,
Location location,
List<? extends IRegion> regions,
List<VisualGridSelector[]> regionSelectors) |
static ImageMatchSettings |
createImageMatchSettings(ICheckSettingsInternal checkSettingsInternal,
EyesBase eyes)
Build match settings by merging the check settings and the default match settings.
|
static ImageMatchSettings |
createImageMatchSettings(ICheckSettingsInternal checkSettingsInternal,
EyesScreenshot screenshot,
EyesBase eyesBase)
Build match settings by merging the check settings and the default match settings.
|
EyesScreenshot |
getLastScreenshot() |
MatchResult |
matchWindow(Trigger[] userInputs,
Region region,
String tag,
boolean shouldRunOnceOnTimeout,
ICheckSettingsInternal checkSettingsInternal,
String source)
Repeatedly obtains an application snapshot and matches it with the next
expected output, until a match is found or the timeout expires.
|
protected Logger logger
protected ServerConnector serverConnector
protected RunningSession runningSession
protected AppOutputProvider appOutputProvider
protected MatchResult matchResult
protected EyesBase eyes
public MatchWindowTask(Logger logger, ServerConnector 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 static void collectRegions(ImageMatchSettings imageMatchSettings, ICheckSettingsInternal checkSettingsInternal)
public static void collectRegions(ImageMatchSettings imageMatchSettings, Location location, List<? extends IRegion> regions, List<VisualGridSelector[]> regionSelectors)
public MatchResult matchWindow(Trigger[] userInputs, Region region, String tag, boolean shouldRunOnceOnTimeout, ICheckSettingsInternal checkSettingsInternal, String source)
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.checkSettingsInternal - The settings to use.public static ImageMatchSettings createImageMatchSettings(ICheckSettingsInternal checkSettingsInternal, EyesScreenshot screenshot, EyesBase eyesBase)
checkSettingsInternal - the settings to match the image by.screenshot - the Screenshot wrapper object.public static ImageMatchSettings createImageMatchSettings(ICheckSettingsInternal checkSettingsInternal, EyesBase eyes)
checkSettingsInternal - the settings to match the image by.public EyesScreenshot getLastScreenshot()
Copyright © 2022. All rights reserved.