title: Finding the number of pagination buttons in Selenium WebDriver
body: <p>Pagination is itself a last row of table "ContentPlaceHolder1_gvChannelList".
  I want to count the number of pages/number of columns in pagination table.</p>
  
  <pre><code>driver.findElements(By.id("//*[@id='ContentPlaceHolder1_gvChannelList']/tbody/tr[17]/td/table/tbody/tr/td")).size()
  </code></pre>
  
  <p>Is returning 0 though there are five columns/<code>&lt;td&gt;</code> tags.</p>
  
  <p><a href="http://i.stack.imgur.com/FCvCK.png" rel="nofollow">html table element hierarchy</a></p>