title: XPath Class is and Text Contains
body: <p>I've been slowly getting better at XPATH but every time I think I have it (at least at a basic level) something which I thought was obvious decides to throw me.</p>
  
  <p>Trying to click a list item:</p>
  
  <pre><code>&lt;li class="league_check " id="lg_chk_br_1_l_22953" onclick="BranchWindow.showLeague(1,22953);"&gt; &lt;img leagueid="22953" src="/i/none_v.gif" width="12" height="12" onclick="BranchWindow.switchLeague(1,22953); cancelBubble(event);"&gt;Champions League &lt;/li&gt;
  </code></pre>
  
  <p>With this:</p>
  
  <pre><code>eachleague = "Champions League"
  link = Driver.find_elements_by_xpath("//li[contains(@class, 'league_check ') and text() = '%s']" % eachleague)
  </code></pre>
  
  <p>I'm double checking everything has actually loaded etc... And (to my understanding of XPATH) this should be finding the list item.</p>
  
  <p>Can anyone shed some light on what I'm missing?</p>