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 iteraye script using loops
Hi i want to iterate a script after it is ended successfully. I am using this syntax to iterate the process
The syntax is as follows:
function onScriptEnd()
{
_include("C:/Documents and Settings/bappi/sahi/userdata/scripts/affinity-local.sah");
_include("C:/Documents and Settings/bappi/sahi/userdata/scripts/affinity-local.sah");
_include("C:/Documents and Settings/bappi/sahi/userdata/scripts/affinity-local.sah");
}
But i want to iterate using for loop or any other loop function..
Plz help me...
The syntax is as follows:
function onScriptEnd()
{
_include("C:/Documents and Settings/bappi/sahi/userdata/scripts/affinity-local.sah");
_include("C:/Documents and Settings/bappi/sahi/userdata/scripts/affinity-local.sah");
_include("C:/Documents and Settings/bappi/sahi/userdata/scripts/affinity-local.sah");
}
But i want to iterate using for loop or any other loop function..
Plz help me...
Comments
I did not know this would work, but is working well. But iterating like include("yourfile"+$i) will not be possible, see http://sahi.co.in/forums/viewtopic.php?id=1807
Does this help you?
Regards
Wormi
Thanks for showing interest in my topic..
But the code is not working...
My basic requirement is to iterate the script. If you have any other solution please share it
Do you want a single script to be repeated X times? Then use the code above.
Or do you want to iterate over a list of scripts ?
I'm sorry but I don't really get what you mean by iterating.