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.
Batch Run
Hi Narayan,
I am trying to run a suite through command line,
Here is my suite file
UI-SUBM-005(2).sah http://10.11.252.218:8003/richcdm/
UI-SUBM-006(2).sah http://10.11.252.218:8003/richcdm/
UI-SUBM-007(2).sah http://10.11.252.218:8003/richcdm/
and
..\tools\toggle_IE_proxy.exe enable
java -cp ..\lib\ant-sahi.jar net.sf.sahi.test.TestRunner
/sahi/scripts/spring/New Folder/my.suite
"C:\Program Files\Internet Explorer\iexplore.exe"
http://10.11.252.218:8003/richcdm/main.jsf default localhost 9999 3
..\tools\toggle_IE_proxy.exe disable
Its opening the Blank page, and shows the following error
'http:' is not recognized as an internal or external command,
operable program or batch file.
C:\Documents and Settings\softsmith>..\tools\toggle_IE_proxy.exe disable
The system cannot find the path specified.
Please tell me where i hav gone wrong.
I am trying to run a suite through command line,
Here is my suite file
UI-SUBM-005(2).sah http://10.11.252.218:8003/richcdm/
UI-SUBM-006(2).sah http://10.11.252.218:8003/richcdm/
UI-SUBM-007(2).sah http://10.11.252.218:8003/richcdm/
and
..\tools\toggle_IE_proxy.exe enable
java -cp ..\lib\ant-sahi.jar net.sf.sahi.test.TestRunner
"C:\Program Files\Internet Explorer\iexplore.exe"
http://10.11.252.218:8003/richcdm/main.jsf default localhost 9999 3
..\tools\toggle_IE_proxy.exe disable
Its opening the Blank page, and shows the following error
'http:' is not recognized as an internal or external command,
operable program or batch file.
C:\Documents and Settings\softsmith>..\tools\toggle_IE_proxy.exe disable
The system cannot find the path specified.
Please tell me where i hav gone wrong.
Comments
Keep http://10.11.252.218:8003/richcdm/main.jsf in double quotes like this:
"http://10.11.252.218:8003/richcdm/main.jsf" in your batch file and try again.
See if this helps. Revert back in case of any problems
Regards,
Pankaj.
Its giving the syntax error with double quotes -
The filename, directory name, or volume label syntax is incorrect.
and the blank page opens up.
If it is one of the more recent versions of Sahi, you may need to add iexplore.exe after 3.
I have changed the folder name, added iexplore.exe after 3,but still the same problem.
It executes these lines "D:/sahi/scripts/spring/New Folder/my.suite"
"C:\Program Files\Internet Explorer\iexplore.exe"
i.e opens the my.suite file and blank IE page and stops
Are there any further settings required for this
ie I have done the proxy settings and opened the controller on my application, then executed these lines through command prompt
Is this correct,wat else need to be done.
You may already be doing this, but just clarifying. There should be no line breaks in the java -cp line. The batch file should look like below.
*Line 1*: ..\tools\toggle_IE_proxy.exe enable
*Line 2*: java -cp ..\lib\ant-sahi.jar net.sf.sahi.test.TestRunner "D:/sahi/scripts/spring/New Folder/my.suite" "C:\Program Files\Internet Explorer\iexplore.exe" http://10.11.252.218:8003/richcdm/main.jsf default localhost 9999 3
*Line 3*: ..\tools\toggle_IE_proxy.exe disable
C:\Documents and Settings\softsmith>D:sahi\tools\toggle_IE_proxy.exe enable
C:\Documents and Settings\softsmith>java -cp ..\lib\ant-sahi.jar net.sf.sahi.tes
t.TestRunner "D:/sahi/scripts/spring/NewFolder/my.suite" "C:\Program Files\Int
ernet Explorer\iexplore.exe" http://10.11.252.218:8003/richcdm/main.jsf default
localhost 9999 3 iexplore.exe
Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/sahi/test/Test
Runner
C:\Documents and Settings\softsmith>D:\sahi\tools\toggle_IE_proxy.exe disable
ant-sahi.jar is present in my sahi/lib folder.
Below is the code from my batch file that runs fine. See if this works for you. this os for older sahi. u can change it to work with new version. i think you will have to add iexplorer.exe at the end as mentioned by Narayan. all should be in a single line without newline character.
I hope this should help.
Regards,
Pankaj.
Its working fine now,I think the problem was with '\\' in the path.
Thanks a lot.
either use '/' or '\\' in file path
Regards,
Pankaj.
I am assuming the "http://<IP_Address>:<Port#>/..." is supposed to be the Base URL of the app you are trying test.
Up until now I was able to access the HTTPS site without an IP address or port number. I was able to get the IP address via a ping command but how do I determine the port number?
Thanks,
RR
Try this:
Navigate to your application in IE/Firefox.
Now open command prompt. ping the application url to know its IP.
Now type command:
netstat -n
this will give you the url along with the port number. it will look like this:
Proto Local Address Foreign Address State
TCP 127.0.0.1:1036 127.0.0.1:32000 ESTABLISHED
In this table identify the IP of your application under the "Foreign Address" and the port after the semi-colon(32000 in this case) is your required port number. I hope this will help.
Regards,
Pankaj.
Since we know the IP and port, and URL is the same and the window is not modal (meaning I can read the HTML) why can't we place a "_click(_link("overridelink"));" command before the login commands to make it go away?
RR