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.
Writing test scripts calling other scripts with passing arguments.
Is it possible call a Script in another Script and pass argument into the calling Script in SAHI?
This discussion has been closed.
Comments
From the link you gave i am clear that we can pass a Sahi script in another Sahi script.
Now can you please tell me that, Is it possible that we can pass arguments or variables along with the Sahi script in _include()?
For Ex:-
Suppose in a Sahi script for login we need 2 variables UserName and Password.
This login script can be called in any other scripts with any combination of UserName and Password.
So is it Possible as follows:-
_include("includesdir/login.sah","tester1","user1");
Thanks in Advance.
Thanks Again for your support and help.
Can you please tell me is there any other way dat we can do the above requirement in Sahi?
Thanks in advance.
There is one other way though it is not recommended.
Not sure if this is applicable to you, but if you are trying to avoid writing functions, I would suggest that spending an hour learning functions and organizing code into functions will save you a lot of maintenance problems later.
Regards,
Narayan
Thanks very much for the help and support.
I will also prefer the 1st example for using function() as suggested by you.
Thanks.