title: Assert text is present which contains acronyms using Selenium
body: <p>I've setup a function of my Selenium (v 2.3) tests to check for the presence of certain error messages which has worked perfectly until an element I'm checking has an acronym in.</p>
  
  <p>My function gets all errors in the page and then searches that <code>div</code> for the message expected;</p>
  
  <pre><code># el is the error div element
  error_el = el.find_element_by_xpath('p[contains(text(), "{0}")]'.format(error_text))
  ...
  self.assertIsNotNone(error_el) # make sure it actually found something
  </code></pre>
  
  <p>I'm calling this from my tests with <code>self.assertFieldError('My error message')</code> and it works perfectly, until <code>'My error message'</code> contains an acronym. If an acronym is present, Selenium doesn't match my string to the paragraph.</p>
  
  <p>My current solution to this is to check for the string in the source for the page, but this isn't ideal if it's a string that appears more than once.</p>
  
  <p>Is it possible to ignore acronym tags or improve my xpath to allow text or text with acronyms? I'd always assumed that the <code>text()</code> method operated exactly as things are seen by the user and it'd automatically ignore acronyms.</p>
  
  <p><em>edit</em></p>
  
  <p>The error messages are attached to the field's using Javascript which gets the field label from the Django form via it's field name. Although this shouldn't be relevant to Selenium as far as I'm aware.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="field"&gt;
      &lt;div class="error"&gt;
          &lt;p&gt;My &lt;acronym title="Error"&gt;ERR&lt;/acronym&gt; message&lt;/p&gt;
      &lt;/div&gt;
      &lt;label for="id_myField"&gt;My &lt;acronym title="Error"&gt;ERR&lt;/acronym&gt; message&lt;/label&gt;
      &lt;input id="id_myField" type="text"&gt;
  &lt;/div&gt;
  </code></pre>