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.
is there way to get cell count?
A table has multiple rows for the column "Status" which holds "success" "failure" "warning" etc. I needed to get count of the cell for each type of status. Any idea?
Comments
// count the occurrences of $string on a page. Pass sahi objects outerHTML attribute
function countStrings($string) {
var $count = 0;
_set($page, document.body.outerHTML);
_set($count, $page.split($string).length -1);
return($count);
}
$count = countStrings("<TD>unit </TD>");
_alert($count);
_set($count, getTemplateCount($template));
_alert($count);