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.
run sahi script on already open browser
Pls guide me how to run a sahi script on a browser that is already open ..
Comments
Are you telling that you have opened a browser from Dashoboard? If so, then you can Press Alt and double click on the browser to launch the controller.
Now, click Playback on the controller. Specify file name and start URL, click set and you can see the scripts running.
Let me know if you are facing any problem.
Regards
Sumitra
For example.
Script1:
I am opening a browser and browse through Google.co.in
Now after this i have another script,
Script 2 :
I will type a text in search bar.and click search button
In this case the script 2 has to run in already open browser where script 1 has been executed.
Hope you got my question is this possible ?
Pls help me!
I have one more question.
Suppose i want to run a script on a browser that is already open [NOT opened THROUGH sahi dashboard]
Is this possible.?
My expectation :
IF i call a script2 through command line , and key in inputs on the exact active browser where it has to run, the script should be executed.
This is how Sahi works :
You can run script 1 and script 2 using a suite file.
A suite file is a normal text file with an extension of .suite. For example you may have myapp.suite.
Each line of myapp.suite will have this syntax:
<testName.sah> <(optional) absolute url or url relative to the baseurl>
eg.
test1.sah /startPageForTest1.jsp
test2.sah http://www.myappdomain.com/startPageForTest2.htm
test3.sah
//commented_test1.sah
#commented_test2.sah
The suite can be executed through the command line or through ant.
For more details to work with suite file:
http://sahi.co.in/w/Running+multiple+tests+in+batch+mode
[EDITED:Narayan] If you want the script 2 to run on the same browser, edit sahi/userdata/bin/testrunner.bat and change
SET SINGLE_SESSION=false
to
SET SINGLE_SESSION=true
Regards
Sumitra
Is it possible to do something similar as above but from java?
Thanks
http://sahi.co.in/w/Running+multiple+te … batch+mode :
If you have a look at the mentioned URL you can see how to run the suite file using java.
You can set : -useSingleSession true or false// If true runs all scripts in a single browser without closing it between scripts.
Let me know if you face any problem.
Regards
Sumitra