protected String toXPath() { String escapedAttributeName = AttributeEvaluatorUtils.toXPathAttribute(this.getAttributeName()); String attrValue = this.getWantedValue(); String escapedWantedValue = SelectorUtils.intoEscapedXPathString(this.getWantedValue()); return "substring("+escapedAttributeName+", string-length(" + escapedAttributeName + ")-" + (attrValue.length() - 1) + ") = " + escapedWantedValue; }
protected String toXPath() { String escapedAttributeName = AttributeEvaluatorUtils.toXPathAttribute(this.getAttributeName()); String attrValue = this.getWantedValue(); String escapedWantedValue = SelectorUtils.intoEscapedXPathString(this.getWantedValue()); return "substring("+escapedAttributeName+", string-length(" + escapedAttributeName + ")-" + (attrValue.length() - 1) + ") = " + escapedWantedValue; }