@ConfigValidator public void checkValid() { checkNotNullAndNotEmpty(this.url, "url"); checkNotNullAndNotEmpty(this.driverClassName, "driverClassName"); }
@ConfigValidator public void checkValid() { switch (seleniumDriverType) { case CHROME: checkChromeProperties(); break; case REMOTE_WEB_DRIVER: checkRemoteWebDriverProperites(); break; default: throw new ConfigValidatorException("Selenium Driver Type " + seleniumDriverType + " config cannot be validated"); } }
@ConfigValidator public void checkValid() { if ( isJavaProcess() ) { //some properties are mandatory for java processes checkPropertiesForJavaProcess(); } else { //some properties should not be used for non-java processes checkPropertiesForNativeProcess(); } }
@ConfigValidator public void validate() { if (host == null) throw new ConfigValidatorException("host property must be set"); if (port < 0) throw new ConfigValidatorException("port must be set and > 0"); if (connectionAttempts < 0) throw new ConfigValidatorException("connectionAttempts must be set and > 0"); if (connectionAttemptMillis < 0) throw new ConfigValidatorException("connectionAttemptMillis must be set and > 0"); }
@ConfigValidator public void checkValid() { if ( getPort() == 0) { throw new ConfigValidatorException("port cannot be 0"); } else if ( getStepTimeoutSeconds() < 1) { throw new ConfigValidatorException("stepTimeoutSeconds was less than 1"); } else if ( getScope() == null) { throw new ConfigValidatorException("scope was not set"); } else if ( getClientConnectTimeoutSeconds() < 1) { throw new ConfigValidatorException("client connect timeout seconds cannot be < 1"); } }