@Override protected void setViewportSize(RectangleSize size) { logger.log("WARNING setViewportSize() was called in Visual-Grid context"); }
/** * @param hostApp The application running the AUT (e.g., Chrome). */ @SuppressWarnings("UnusedDeclaration") public void setHostApp(String hostApp) { logger.log("Host App: " + hostApp); if (hostApp == null || hostApp.isEmpty()) { this.hostApp = null; } else { this.hostApp = hostApp.trim(); } }
/** * @param hostApp The application running the AUT (e.g., Chrome). */ @SuppressWarnings("UnusedDeclaration") public void setHostApp(String hostApp) { logger.log("Host App: " + hostApp); if (hostApp == null || hostApp.isEmpty()) { this.hostApp = null; } else { this.hostApp = hostApp.trim(); } }
/** * @param hostApp The application running the AUT (e.g., Chrome). */ @SuppressWarnings("UnusedDeclaration") public void setHostApp(String hostApp) { logger.log("Host App: " + hostApp); if (hostApp == null || hostApp.isEmpty()) { this.hostApp = null; } else { this.hostApp = hostApp.trim(); } }
/** * @param hostOS The host OS running the AUT. */ @SuppressWarnings("UnusedDeclaration") public void setHostOS(String hostOS) { logger.log("Host OS: " + hostOS); if(hostOS == null || hostOS.isEmpty()) { this.hostOS = null; } else { this.hostOS = hostOS.trim(); } }
/** * @param hostOS The host OS running the AUT. */ @SuppressWarnings("UnusedDeclaration") public void setHostOS(String hostOS) { logger.log("Host OS: " + hostOS); if(hostOS == null || hostOS.isEmpty()) { this.hostOS = null; } else { this.hostOS = hostOS.trim(); } }
/** * @param hostOS The host OS running the AUT. */ @SuppressWarnings("UnusedDeclaration") public void setHostOS(String hostOS) { logger.log("Host OS: " + hostOS); if(hostOS == null || hostOS.isEmpty()) { this.hostOS = null; } else { this.hostOS = hostOS.trim(); } }
/** * @param baselineName If specified, determines the baseline to compare * with and disables automatic baseline inference. */ @SuppressWarnings("UnusedDeclaration") public void setBaselineName(String baselineName) { logger.log("Baseline name: " + baselineName); if(baselineName == null || baselineName.isEmpty()) { this.baselineName = null; } else { this.baselineName = baselineName.trim(); } }
/** * If not {@code null} specifies a name for the environment in which the application under test is running. * * @param envName The name of the environment of the baseline. */ @SuppressWarnings("UnusedDeclaration") public void setEnvName(String envName) { logger.log("Environment name: " + envName); if(envName== null || envName.isEmpty()) { this.environmentName = null; } else { this.environmentName = envName.trim(); } }
/** * If not {@code null}, determines the name of the environment of the baseline. * * @param baselineEnvName The name of the baseline's environment. */ @SuppressWarnings("UnusedDeclaration") public void setBaselineEnvName(String baselineEnvName) { logger.log("Baseline environment name: " + baselineEnvName); if(baselineEnvName== null || baselineEnvName.isEmpty()) { this.baselineEnvName = null; } else { this.baselineEnvName = baselineEnvName.trim(); } }
/** * If not {@code null} specifies a name for the environment in which the application under test is running. * * @param envName The name of the environment of the baseline. */ @SuppressWarnings("UnusedDeclaration") public void setEnvName(String envName) { logger.log("Environment name: " + envName); if(envName== null || envName.isEmpty()) { this.environmentName = null; } else { this.environmentName = envName.trim(); } }
/** * If not {@code null}, determines the name of the environment of the baseline. * * @param baselineEnvName The name of the baseline's environment. */ @SuppressWarnings("UnusedDeclaration") public void setBaselineEnvName(String baselineEnvName) { logger.log("Baseline environment name: " + baselineEnvName); if(baselineEnvName== null || baselineEnvName.isEmpty()) { this.baselineEnvName = null; } else { this.baselineEnvName = baselineEnvName.trim(); } }
public static void logExceptionStackTrace(Logger logger, Throwable ex) { ByteArrayOutputStream stream = new ByteArrayOutputStream(2048); PrintWriter writer = new PrintWriter(stream, true); ex.printStackTrace(writer); logger.log(ex.toString()); try { logger.log(stream.toString("UTF-8")); writer.close(); stream.close(); } catch (Exception e) { e.printStackTrace(); } }
public static void logExceptionStackTrace(Logger logger, Exception ex) { ByteArrayOutputStream stream = new ByteArrayOutputStream(2048); PrintWriter writer = new PrintWriter(stream, true); ex.printStackTrace(writer); logger.log(ex.toString()); try { logger.log(stream.toString("UTF-8")); writer.close(); stream.close(); } catch (Exception e) { e.printStackTrace(); } }
@Override public void run() { while (isServiceOn) { pauseIfNeeded(); runNextTask(); } if (this.executor != null) { this.executor.shutdown(); } logger.log("Service '" + this.getName() + "' is finished"); }
@Override protected String getAUTSessionId() { try { if (this.cachedAUTSessionId == null) { this.cachedAUTSessionId = driver.getRemoteWebDriver().getSessionId().toString(); } return this.cachedAUTSessionId; } catch (Exception e) { logger.log("WARNING: Failed to get AUT session ID! (maybe driver is not available?). Error: " + e.getMessage()); return ""; } }
public void check(String name, ICheckSettings checkSettings) { if (getIsDisabled()) { logger.log(String.format("check('%s', %s): Ignored", name, checkSettings)); return; } ArgumentGuard.notNull(checkSettings, "checkSettings"); checkSettings = checkSettings.withName(name); this.check(checkSettings); }
private void trySwitchToFrames(WebDriver driver, EyesTargetLocator switchTo, FrameChain frames) { if (EyesSeleniumUtils.isMobileDevice(driver)) { return; } try { switchTo.frames(frames); } catch (WebDriverException e) { logger.log("WARNING: Failed to switch to original frame chain! " + e.getMessage()); } }
private void initDriver(WebDriver driver) { if (driver instanceof RemoteWebDriver) { this.driver = new EyesWebDriver(logger, this, (RemoteWebDriver) driver); } else if (driver instanceof EyesWebDriver) { this.driver = (EyesWebDriver) driver; } else { String errMsg = "Driver is not a RemoteWebDriver (" + driver.getClass().getName() + ")"; logger.log(errMsg); throw new EyesException(errMsg); } if (EyesSeleniumUtils.isMobileDevice(driver)) { regionVisibilityStrategyHandler.set(new NopRegionVisibilityStrategy(logger)); } }
/** * Sets the maximal time (in seconds) a match operation tries to perform * a match. * * @param seconds Total number of seconds to wait for a match. */ @SuppressWarnings("UnusedDeclaration") public void setMatchTimeout(int seconds) { if (getIsDisabled()) { logger.verbose("Ignored"); return; } logger.verbose("setMatchTimeout(" + seconds + ")"); ArgumentGuard.greaterThanOrEqualToZero(seconds, "seconds"); this.matchTimeout = seconds; logger.log("Match timeout set to " + seconds + " second(s)"); }