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.
how to use a forLoop statment
Narayan,
i would like to insert a data using a loop, because this value that i should entered like
001,002,003...
i would like to use like this. i know my code is wrong but i can not make it work properly. Because SAHI Script does not have a tutorial programming.
function setIdentity(){
var indentityarr=[];
indentityarr[0]="001";
indentityarr[1]="002";
for (var i=0; i<2; i++){
_setValue(_textbox("no"), indentityarr[$i]);
_click(_button("NEXT >>"));
}
}
_click(_link("Locker Baru"));
_wait(3000);
setIdentity();
how to make that code work properly ?
Regards,
Andy Susanto
i would like to insert a data using a loop, because this value that i should entered like
001,002,003...
i would like to use like this. i know my code is wrong but i can not make it work properly. Because SAHI Script does not have a tutorial programming.
function setIdentity(){
var indentityarr=[];
indentityarr[0]="001";
indentityarr[1]="002";
for (var i=0; i<2; i++){
_setValue(_textbox("no"), indentityarr[$i]);
_click(_button("NEXT >>"));
}
}
_click(_link("Locker Baru"));
_wait(3000);
setIdentity();
how to make that code work properly ?
Regards,
Andy Susanto
Comments
Regards,
Narayan