18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How to capture number of rows in a table

NeelimaNeelima Members
edited November -1 in Sahi - Open Source
Hi,

I have just started using Sahi. I want to know whether we can capture the number of rows a table has.

Thanks,
Neelima

Comments

  • narayannarayan Administrators
    Hi Neelima,

    You could use it like this:
    var $rowCount = 0;
    _set($rowCount, _table("myTable").rows.length);
    _alert($rowCount);
    

    Regards,
    Narayan
  • Thanks Narayan
  • Hello,

    I'm using sahi driver with java (the junit testcase). Could you tell me how can I get the same result
    of getting number rows of table in java code ?
  • Hi xmenmg,

    You can use: browser.fetch("_sahi._table('tableName').rows.length");

    Regards
    Sumitra
Sign In or Register to comment.