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 pass CMD param. & make variable available from file?
Dear All,
How can i pass the command line parameters into the sahi scripts ?
I searched for the post but I found that There is only work around method available in which we need to write into file and we need to include that file.
But I am creating the file dynamically in one script and how can I include that file in other script ?
Please Help me.
Also I have another question.
Suppose I have one file with the data as shown below.
KEY1=VALUE1
KEY2=VALUE2
KEY3=VALUE3
Can it be possible that I can Make this KEY1,KEY2,KEY3 variable available in my sahi script ?
Means I can use this variable and It should give the value VALUE1.
Please Help me For this.
How can i pass the command line parameters into the sahi scripts ?
I searched for the post but I found that There is only work around method available in which we need to write into file and we need to include that file.
But I am creating the file dynamically in one script and how can I include that file in other script ?
Please Help me.
Also I have another question.
Suppose I have one file with the data as shown below.
KEY1=VALUE1
KEY2=VALUE2
KEY3=VALUE3
Can it be possible that I can Make this KEY1,KEY2,KEY3 variable available in my sahi script ?
Means I can use this variable and It should give the value VALUE1.
Please Help me For this.
Comments
Using an include is a clean way.
There is another parameter called -initJS which can be passed to Sahi via the java command or through ant script. This takes a valid javascript string and evaluates it before every Sahi script, so that variables are available
In sahi/userdata/bin/testrunner.bat,
Change
to
Now, $name will be available in your scripts.
Regards,
Narayan