title: get number of rows in a table in selenium webdriver in "javascript"
body: <p>M aware of a "bunch" of similar questions. But none helped me since most were java oriented; i tried many possible combinations of size() and length. But no success so far.</p>
  
  <pre><code>driver.findElements(By.xpath("//div[@name='leavesHistoryGrid']/div[1]/div[1]/div[2]/table/tbody/tr")).then(function(tableRows){
      console.log("no of tableRows :",tableRows.size())
  })
  </code></pre>