I got the following (simplified) HTML:
<ul>
<li class="item c-MessageRow green">
<div>Hello and </div>
<div>welcome
<div> to</div>
</div>
<div> my site</div>
</li>
</ul>
Now I'd like to select the li element which has the class "c-MessageRow" and contains the inner text "welcome to my site".
I've tried the following:
//li[contains(@class, 'c-MessageRow') and contains(text(), 'welcome to my site')]
But it returns nothing. What could I be doing wrong here?