title: Cypress get length of a table dynamically
body: <p>I'm trying to test the length of a react table.</p>
  <p>In particular I would want that after a user add a new row to the table it's length would increase by one</p>
  <p>In my code I can't extract the length value of the table and save it in the variable rowsLength so that it can be checked later, what am I doing wrong?</p>
  <p>It seems rowsLength is an object not a number..</p>
  <pre><code>const rowsLength = cy.get(&quot;.MuiTableBody-root&quot;).find(&quot;tr&quot;).its(&quot;length&quot;);
  
  cy.get(&quot;#addRowButton&quot;).click();//new tr inserted
  
  cy.get(&quot;.MuiTableBody-root&quot;).find(&quot;tr&quot;).should(&quot;have.length&quot;, rowsLength + 1);
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/pJfdO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pJfdO.png" alt="enter image description here" /></a></p>