Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

Can't use getElementsByTagName.length value as loop parameter

I have following code in sahi script:

var $inputLength = document.getElementsByTagName("button").length;

_alert($inputLength);


for(var $i=0; $i<$inputLength; $i++)
{
_alert("test");

}

Result is:

_alert($inputLength); -> gives me 21 in popup

but

for loop doesn't start code inside brackets. I don't know why "$inputLength" value isn't assigned as 21 number ? Is "21" a string ?

Answers

Sign In or Register to comment.