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.
Sahi Out Parameters.
Hi Team,
I have a scenario like, the test case takes two parameters and sends at-least one OUT parameter, where this OUT parameter again becomes the IN parameter for another test case.
In Sahi terms:
The first Sahi script takes 2 parameters and the output should be atleast one OUT parameter, wherein, this OUT parameter becomes the IN parameter for another Sahi script.
Does Sahi support this type of approach? if so, it would be great if anyone help me how to do it with Sahi with example.
Cheers,
Murali.
I have a scenario like, the test case takes two parameters and sends at-least one OUT parameter, where this OUT parameter again becomes the IN parameter for another test case.
In Sahi terms:
The first Sahi script takes 2 parameters and the output should be atleast one OUT parameter, wherein, this OUT parameter becomes the IN parameter for another Sahi script.
Does Sahi support this type of approach? if so, it would be great if anyone help me how to do it with Sahi with example.
Cheers,
Murali.
Tagged:
Comments
Sahi does not have a concept of passing parameters to scripts.
If script A includes script B, any variable declared in the global scope of script A is available to script B, as they are all part of the same runtime.
Eg.
will work as if it was all one script
So you can just declare variables and use them.
That said, it is highly recommended NOT to use global variables like this, because it will limit the reuse of scripts, since one script becomes tied to another.
Instead, do this:
1) Let included files only have functions in them. Let us call them lib1.sah and lib2.sah.
2) Include lib1.sah and lib2.sah wherever you want and call the functions in them. That way you can mix and match various functions to get your desired result.
So instead of having
You should do something like this:
Let me know if this makes sense to you.
Regards,
Narayan
I have also posted another question regarding invoking the sahi script from java program. Can you help me in discussing that senario?