Package com.canoo.webtest.engine.xpath

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


        throw new StepFailedException("Wrong result for xpath >" + fXpath + "<", getText(), actualValue, this);
      }
    }
    else
    {
      final Object singleNode = xpathHelper.selectFirst(currentResponse, getXpath());
      if (singleNode == null) {
        throw new StepFailedException("xpath test: " + fXpath + " matched no nodes", this);
      }
      else if (Boolean.FALSE.equals(singleNode))
      {
View Full Code Here


    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)) {

      if (getDefault() == null)
      {
        throw new StepFailedException("No match for xpath expression <" + fXpath + ">", this);
      }
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.