title: How to take text from an HTML element which uses a custom attribute?
body: <p>I am working on Selenium framework 2.0 Web driver and I would like to get value from a span which has a attribute like data-automation-id. The HTML code is as below</p>
  
  <pre><code>&lt;span data-automation-id="SEL_ERR"&gt;
    Error Description
  &lt;/span&gt;
  </code></pre>
  
  <p>Now I want to read the text with in span that has a attribute <strong>data-automation-id</strong> set to SEL_ERR.</p>
  
  <p>Can some one help me in fixing the code as I have already tried the one below but in vain.</p>
  
  <pre><code>driver.findElement(By.tagName("span")).getAttribute("data-automation-id");
  </code></pre>