title: Selenium check if attribute contains part of a string in java
body: <p>So I have a webpage where the Id's of certain elements are generated dynamically with certain parts changing and certain parts being constant like so: </p>
  
  <pre><code>&lt;div id= "xxxdiv" title= 'this title'&gt;
    &lt;p id = "xxxp"&gt;
    &lt;table id = "xxxtable" title = 'not derp'&gt;
           &lt;div id = "yyyydiv"&gt;
             &lt;table id = "yyytable" title= 'derp'&gt;
               &lt;table id = "yyytable2" title = 'not derp'&gt;
                 &lt;table id = "zzztable" title = derp&gt;
  </code></pre>
  
  <p>I'm trying to do some dynamic lookups on the page that can look for a given element where the id contains a known value. For instance, I do not always know how many nested elements might exist so the number that gets generated on the end can vary. So I would like to find an element by xpath where the @title = not derp and the @id contains yyy. How can I accomplish this? </p>