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 @ 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;


for(var $i=0; $i<$inputLength; $i++)


Result is:

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


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 ?


Sign In or Register to comment.