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.

I cannot get a loop to execute

DougStevensDougStevens Members
edited November -1 in Sahi - Open Source
var $tblCount = document.getElementsByTagName("table").length;
for(var $indx = 0; $indx<$tblCount; $indx++){
_alert($indx);
}

$tblCount = 62 and the $indx<$tblCount returns true. However, it will not execute the loop. What am i missing?

Comments

  • narayannarayan Administrators
    Hi Doug,

    Use

    var $tblCount;
    _set($tblCount, document.getElementsByTagName("table").length);

    instead of

    $tblCount = document.getElementsByTagName("table").length;

    Regards,
    Narayan
  • THAT DID IT... thanks
This discussion has been closed.