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.
global variable
Hi all,
Is it possible to use the variable from one script that is declared in another script without including the file in the script.
Is it possible to use the variable from one script that is declared in another script without including the file in the script.
This discussion has been closed.
Comments
see http://sahi.co.in/w/_getglobal
Regards
Wormi
You can use _setGlobal and _getGlobal API to do it.Declare _setGlobal in Script1,
syntax:
_setGlobal("variable1","value1");
and declare _getGlobal in script2
syntax:
_set($variable1,"variable1");
create a suite file using this two scripts and set the capacity option for the Browser Type to 1 for the Browser you wish to run in BrowserTypes.xml.Then,run the suite file,you will be able to use the variable from script1 in script2 without including the script1 in script2.
Regards
Theeran.