title: How to uniquely identify and click on desired link using webdriver
body: <p>I have this html </p>
  
  <pre><code>&lt;a class="level1 static" href="#" onclick="__doPostBack('ctl00$cph1$mnuPager','2')" tabindex="-1"&gt;2&lt;/a&gt;
  
  &lt;a class="level1 static" href="#" onclick="__doPostBack('ctl00$cph1$mnuPager','5')" tabindex="-1"&gt;5&lt;/a&gt;
  
  &lt;a class="level1 static" href="#" onclick="__doPostBack('ctl00$cph1$mnuPager','6')" tabindex="-1"&gt;6&lt;/a&gt;
  </code></pre>
  
  <p>each a tag represents a number hyperlink. What I want to do is use webdriver to find a tag that has a number and click on it. for example the webdriver should find a tag that has 2 and click on it. So I tried this code</p>
  
  <pre><code>driver.find_element_by_link_text('2').click
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>driver.find_element_by_css_selector("a[onclick*='__doPostBack('ctl00$cph1$mnuPager','2')']").click
  </code></pre>
  
  <p>but nothing happens. How do I uniquely identify and click on desired number using webdriver.</p>