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.
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) ]";
var path = '//' + e.tagName.toLowerCase() +"[normalize-space(.) = '" + str + "']";