title: WebDriver - Python - How many elements in a table
body: <p>I grab text from some elements on a table (TableExemple) with Selenium :</p>
  
  <pre><code> element1 = driver.find_element_by_xpath("//table[@id='TableExemple']/tbody/tr[2]/td").text
   element2 = driver.find_element_by_xpath("//table[@id='TableExemple']/tbody/tr[3]/td").text
   element3 = driver.find_element_by_xpath("//table[@id='TableExemple']/tbody/tr[4]/td").text
   element4 = driver.find_element_by_xpath("////table[@id='TableExemple']/tbody/tr[5]/td").text
  </code></pre>
  
  <p>In some cases, only element1 is present on the table.</p>
  
  <p>How to check if others elements exist, to avoid error?</p>
  
  <p>It´s possible to count how many elements have the table ( like  .options attribute for a drop-down menu : <a href="https://stackoverflow.com/questions/27454606/webdriver-python-how-many-elements-in-a-drop-down-menu">WebDriver - Python - How many elements in a drop-down menu</a>)?</p>
  
  <p>Thanks</p>