@Override public MatchResult matchWindow(String resultImageURL, String domLocation, ICheckSettings checkSettings) { ICheckSettingsInternal checkSettingsInternal = (ICheckSettingsInternal) checkSettings; MatchWindowTask matchWindowTask = new MatchWindowTask(this.logger, this.serverConnector, this.runningSession, getMatchTimeout(), this); ImageMatchSettings imageMatchSettings = matchWindowTask.createImageMatchSettings(checkSettingsInternal, null); String tag = checkSettingsInternal.getName(); AppOutput appOutput = new AppOutput(tag, null, domLocation, resultImageURL); AppOutputWithScreenshot appOutputWithScreenshot = new AppOutputWithScreenshot(appOutput, null); return matchWindowTask.performMatch(new Trigger[0], appOutputWithScreenshot, tag, false, imageMatchSettings); }
private void matchRegion(ICheckSettingsInternal checkSettingsInternal, MatchWindowTask mwt, List<EyesScreenshot> subScreenshots) { String name = checkSettingsInternal.getName(); for (EyesScreenshot subScreenshot : subScreenshots) { debugScreenshotsProvider.save(subScreenshot.getImage(), String.format("subscreenshot_%s", name)); ImageMatchSettings ims = mwt.createImageMatchSettings(checkSettingsInternal, subScreenshot); AppOutput appOutput = new AppOutput(name, ImageUtils.base64FromImage(subScreenshot.getImage()), null, null); AppOutputWithScreenshot appOutputWithScreenshot = new AppOutputWithScreenshot(appOutput, subScreenshot); MatchResult matchResult = mwt.performMatch( new Trigger[0], appOutputWithScreenshot, name, false, ims); logger.verbose("matchResult.asExcepted: " + matchResult.getAsExpected()); } }
logger.verbose("Done!"); AppOutputWithScreenshot result = new AppOutputWithScreenshot( new AppOutput(title, compressResult), screenshot); logger.verbose("Done!"); return result;
logger.verbose("Done!"); AppOutputWithScreenshot result = new AppOutputWithScreenshot( new AppOutput(title, compressResult), screenshot); logger.verbose("Done!"); return result;
logger.verbose("Done!"); AppOutputWithScreenshot result = new AppOutputWithScreenshot( new AppOutput(title, compressResult), screenshot); logger.verbose("Done!"); return result;