title: Retrieve an xpath text contains using text()
body: <p>I've been hacking away at this one for hours and I just can't figure it out. Using XPath to find text values is tricky and this problem has too many moving parts.</p>
  
  <p>I have a webpage with a large table and a section in this table contains a list of users (assignees) that are assigned to a particular unit. There is nearly always multiple users assigned to a unit and I need to make sure a particular user is assigned to any of the units on the table. I've used XPath for nearly all of my selectors and I'm half way there on this one. I just can't seem to figure out how to use <code>contains</code> with <code>text()</code> in this context.</p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>//td[@id='unit']/span [text()='asdfasdfasdfasdfasdf (Primary); asdfasdfasdfasdfasdf, asdfasdfasdfasdf; 456, 3456'; testuser]
  </code></pre>
  
  <p>The XPath Query above captures all text in the particular section I am looking at, which is great. However, I only need to know if testuser is in that section.</p>