18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Number of rows and columns in a webtable
Hi,
Is there any way in sahi to find out total number of rows and columns in a table?
I have been using DOM statements by accessing the elements id's, but some how those seem to be not working out for me.
I have a web table, I have to traverse through it to find out the match i require and then perform some action on it.
Appreciate any help on this.
I have been using sahi_20080627 version.
Rgds,
Vazid
Is there any way in sahi to find out total number of rows and columns in a table?
I have been using DOM statements by accessing the elements id's, but some how those seem to be not working out for me.
I have a web table, I have to traverse through it to find out the match i require and then perform some action on it.
Appreciate any help on this.
I have been using sahi_20080627 version.
Rgds,
Vazid
Comments
This will give you the number of rows in table.
I think the number of columns will be constant and hopefully known beforehand.
Regards,
Pankaj.
Thanks for the quick reply. I have been trying with the syntax you have posted. But sahi, when executed with that particular code stops the execution and the log shows as the <Rows>[variable in above example] undefined.
So i had to try for the alternative solutions on this.
Is it possible using any of sahi API's?
Rgds,
Vazid.
Can you share the piece of code that's giving the error.
And I hope u had replaced "Mytable" with the name (id) of the table in your web page.
Regards,
Pankaj.