Below is an example of the elements involved. I'm trying to write an XPATH that points to the list element that contains the string "This Is The Text You're Looking For" but
li//[contains(text(), 'This Is The Text You're Looking For')]
doesn't work. Neither does using the wildcard character '*' in place of 'li' in the XPATH.
<li class = "yadda yadda yadda" tabindex="-1" role="option" aria-selected="false" data-value="3">
<svg xmlns="https://something" viewBox="a b c d" class="yadda yadda yadda" focusable="false" aria-hidden="true"</svg>
" "
"This Is The Text You're Looking For"
<span class="yadda yadda yadda"></span>
</li>
Why isn't my XPATH working, and what do I need to do to point to the list element in my example by looking for that string?