Package com.canoo.webtest.engine

Examples of com.canoo.webtest.engine.StepExecutionException


      checkSetup();
      getProject().setNewProperty(name, value);
      return;
    }

    throw new StepExecutionException("Unknown propertyType: " + thisPropType, this);
  }
View Full Code Here


    if (thisPropType.startsWith(PROPERTY_TYPE_ANT)) {
      checkSetup();
      return getProject().getProperty(name);
    }
    throw new StepExecutionException("Unknown propertyType: " + thisPropType, this);
  }
View Full Code Here

    if (thisPropType.startsWith(PROPERTY_TYPE_ANT)) {
      checkSetup();
      return getProject().getProperties();
    }
    throw new StepExecutionException("Unknown propertyType: " + thisPropType, this);
  }
View Full Code Here

   * @param condition If true, throws the exception.
   * @param message   The error message.
   */
  protected void paramCheck(final boolean condition, final String message) {
    if (condition) {
      throw new StepExecutionException(message, this);
    }
  }
View Full Code Here

   * @param value   the parameter value
   * @throws StepExecutionException if the value is negative
   */
  protected void positiveOrZeroParamCheck(final int value, final String paramName) {
    if (value < 0) {
      throw new StepExecutionException(paramName + " parameter with value '" + value + "' must not be negative", this);
    }
  }
View Full Code Here

  protected void integerParamCheck(final String param, final String paramName, final boolean nonNegative) {
    try {
      final int value = Integer.parseInt(param);
      if (nonNegative && value < 0) {
        throw new StepExecutionException(paramName + " parameter with value '" + param + "' must not be negative", this);
      }
    } catch (NumberFormatException e) {
      throw new StepExecutionException("Can't parse " + paramName + " parameter with value '" + param + "' as an integer.", this);
    }
  }
View Full Code Here

  protected void verifyParameters() {
        super.verifyParameters();
        nullParamCheck(getFileName(), "fileName");
        if (isCheckFileExists() && !getFileName().exists())
        {
          throw new StepExecutionException("File doesn't exist: " + getFileName().getAbsolutePath(), this);
        }
    }
View Full Code Here

      fIsRelative = ConversionUtil.convertToBoolean(fRelative, false);
    nullResponseCheck();

    if (getHtmlId() != null && getName() != null)
    {
      throw new StepExecutionException("\"name\" and \"htmlId\" can't be combined!", this);
    }
    else if (getName() == null && getHtmlId() == null)
    {
      throw new StepExecutionException("\"name\" or \"htmlId\" must be set!", this);
    }
    }
View Full Code Here

  private boolean sameContent(final WebResponse reference, final WebResponse actual) {
    try {
      return IOUtils.contentEquals(reference.getContentAsStream(), actual.getContentAsStream());
    }
    catch (final IOException e) {
      throw new StepExecutionException("Error reading content", e);
    }
  }
View Full Code Here

            final String msg = "Assertion error during scriptStep: " + ae.getMessage();
            LOG.debug(msg, ae);
            throw new StepFailedException(msg, this);
        } catch (BuildException be) {
            LOG.debug(be.getMessage(), be);
            throw new StepExecutionException("Error invoking script: " + be.getMessage(), this);
    } finally {
            if (!isKeep()) {
                context.setRunner(null);
            }
        }
View Full Code Here

TOP

Related Classes of com.canoo.webtest.engine.StepExecutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.