title: Finding xpath of a link using link text?
body: <p>In Selenium WebDriver, how to use xpath for the below HTML using Link Text ("Add New Button")  </p>
  
  <pre><code>&lt;a href="SOME URL"&gt;
   &lt;span &gt;
    &lt;i class=""/&gt;
   &lt;/span&gt;Add New Button
  &lt;/a&gt;
  </code></pre>
  
  <p>I tried  to inspect the element as below but all dint work</p>
  
  <pre><code>1) //a[text()='Add New Button']
  2) //a[contains(text(),'Add New Button']
  3) //a/span/i[text()='Add New Button']
  4) //a/span/i[contains(text(),'Add New Button']
  </code></pre>
  
  <p>I know that 3 and 4 won't , but just tried it.</p>
  
  <p>So for such a HTML DOM, How to find the link using the link text using xpath?</p>