title: Number of rows in a table using Selenium C#
body: <p>I am new to Selenium. I am working with c#. There is a table like this . I saw it using FireBug.</p>
  
  <pre><code>&lt;table&gt;
    &lt;tbody&gt;
      &lt;tr class="v-table-row-odd"&gt;&lt;/tr&gt;
      &lt;tr class="v-table-row"&gt;&lt;/tr&gt;
      &lt;tr class="v-table-row-odd"&gt;&lt;/tr&gt;
      &lt;tr class="v-table-row"&gt;&lt;/tr&gt;
      &lt;tr class="v-table-row-odd"&gt;&lt;/tr&gt;
      &lt;tr class="v-table-row"&gt;&lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>And the issue here is I am not knowing how to get the number of rows in a table which changes dynamically. Is there any way??</p>
  
  <p>Tried xpathCount but got some exception issues.. </p>
  
  <pre><code>decimal numOfRows = selenium.GetXpathCount("xpath=/html/body/div/div/div[2]/div/div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div[7]/div/div/div[2]/div/table/tbody/tr");
  </code></pre>
  
  <p>I also tried xpathCount like this</p>
  
  <pre><code>selenium.GetXpathCount("xpath=/html/body/div/div/div[2]/div/div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div[7]/div/div/div[2]/div/table/tbody");
  </code></pre>
  
  <p>But both  raised exceptions. Can anyone help me out in this regard. </p>
  
  <p>Thank You</p>