XPATH COVER PAGE - Yash-777/SeleniumDriverAutomation GitHub Wiki

XML Path Language (XPath) Version 1.0

XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer.

starts-with, ends-with and contains with some value.

Function: number string-length(string?)

The function ends-with() is not defined for XPath 1.0 but only for XPath 2.0 and XQuery.Stack Post

// $str2 = substring($str1, string-length($str1)- string-length($str2) +1)

var innerTextValue = "Yash";
var path =
    "//a[ starts-with(., innerTextValue) and innerTextValue = "+
     "substring(., string-length(.)- string-length(innerTextValue) +1) ]";

Function: string normalize-space(string?) Stack Post

var path = '//' + e.tagName.toLowerCase() +"[normalize-space(.) = '" + str + "']";
⚠️ **GitHub.com Fallback** ⚠️