Package com.canoo.webtest.engine.xpath

Examples of com.canoo.webtest.engine.xpath.XPathHelper.stringValueOf()


  protected void verifyXPath() throws XPathException, StepFailedException {
    final Page currentResponse = getContext().getCurrentResponse();
    final XPathHelper xpathHelper = getContext().getXPathHelper();

    if (isComparingPathAndValue()) {
      final String actualValue = xpathHelper.stringValueOf(currentResponse, getXpath());
      if (!verifyText(actualValue)) {
        throw new StepFailedException("Wrong result for xpath >" + fXpath + "<", getText(), actualValue, this);
      }
    }
    else
View Full Code Here


  }

  protected String evaluateXPath() throws XPathException {
    final Page currentResponse = getContext().getCurrentResponse();
    final XPathHelper xpathHelper = getContext().getXPathHelper();
    final String result = xpathHelper.stringValueOf(currentResponse, getXpath());

    // seems that result is "" and not null when nothing is found
    if (result == null
      || (result.length() == 0 && xpathHelper.selectFirst(currentResponse, getXpath()) == null)) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.