How to get row count of a web table each and every time when we click something in table
<p>I have a table in which 1st column of 1st row having expand  (+) button [if we click (+)button some rows will be added to the table] ..When ever i clik the expand button i need the new row count ...Please help</p>

<p><em>This is the code</em></p>

<p>List rows = m.driver.findElements(By.xpath("//div[@id='table']/tbody/tr"));
        int r=rows.size();</p>

<pre><code>for(int i=1;i&lt;=r;i++)
    {


        WebElement plus=m.driver.findElement(By.xpath("//div[@id='table']/tbody/tr["+i+"]/td[1]")); 

    if(plus.isDisplayed())  //*** expand(+)  button***
    {
        m.driver.findElement(By.xpath(//div[@id='table']/tbody/tr["+i+"]/td[1])).click();   

    }


    }
</code></pre>