Given the following XML:
abcText1cba
abcText2cba
//li[./span[contains(text(),'Text1')]] - have just one target result
//li[./span[contains(text(),'Text')]] - returns two results as target
This approach is using something that isn't well documented anywhere and just few understands how it's powerful
Element specified by Xpath has a child node defined by another xpath