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.
Not able to run Sahi scripts from command line- Immediate help needed!
Hi,
Am new to Sahi. Read the documentation available for running the Sahi scripts from command line but it's not helping.
I have recorded one script. It is placed in 'scripts' folder.
From command line, I give this command 'ie.bat TestMyScript.sah URL'. this opens the url but code inside the script is not executed. Have put alert in the script but that also didnt come up. The script can be successfully playbacked from Sahi controller.
The demo scripts present in scripts/demo folder are also not getting executed from command line only the default page 'Sahi demo url' is getting opened. But code inside 'sahi_demo.sah' is not executed.
Could anyone please help ASAP?
Thanks,
Vineet
Am new to Sahi. Read the documentation available for running the Sahi scripts from command line but it's not helping.
I have recorded one script. It is placed in 'scripts' folder.
From command line, I give this command 'ie.bat TestMyScript.sah URL'. this opens the url but code inside the script is not executed. Have put alert in the script but that also didnt come up. The script can be successfully playbacked from Sahi controller.
The demo scripts present in scripts/demo folder are also not getting executed from command line only the default page 'Sahi demo url' is getting opened. But code inside 'sahi_demo.sah' is not executed.
Could anyone please help ASAP?
Thanks,
Vineet
Comments
I've already spent much time analyzing on it but still can't figure it out.
Any help will be appreciated.
Thanks.
Even i have the same problem of using ie.bat to run in command line
But the scripts runs in firefox when used ff.bat.
I have to pass one url from cmd line like this: ie.bat script.sah url.
This url contains '='. How to escape and get my original url in ie.bat. If I hard code my url in ie.bat, my script runs. But from cmd line it fails.
Please help.
i am new to Sahi. i am trying to execute my sahi script from command line. URL is getting opened. but script is not getting executed. can any on help me.
i am using FF browser.
thanks
venkatesh
Hi
I am facing Same Issue any updates on this????
Please create a new forum post, tell us what you did, what you expected and what you observed. Also post what errors you got.
Regards,
Narayan
Actually i am using SAHI since long time and its quite better with identifying objects and some alternative solutions to make my automation scripts Robust. I am working with some automation framework for complete automation of my Regression TestCases which means It will retrieve TestCase from some online project management Tool , Execute TestScripts for those TestCases and update back to that online tool with Result of this TestExecution infront of individual TestCase at that place.
Though SAHI had few limitations but i could found few work arounds . Now i am looking forward to use windows schedular to start execution on predefined time. For that i need to Create some BATCH file for Starting Execution from Window Schedualr.
But what i found is while execution from Command Prompt execution starts properly but just after navigating to URL from my scripts execution stops. The same scripts are working with using SAHI controller of FireFox,Chrome or IE.
There is no error in command prompt where i start execution with following command.
"ff.bat DriverScript.sah URL
It navigates to that URL but then no further execution of scripts. I checked this command and there is no issue of path and all this. Is there any thing need to change with any property files of this ff.bat, ch.bat or IE.bat files???
ERROR:-
Step >_sahi.setServerVar('\$URL', window.document.location.href);< did not complete in 150 seconds. at Feb 18, 2011 11:08:24 AM
this is the error i can see in log file of sahi. And please note that same script without any changes run fine with SAHI controller from browser.
thanx and regards,
Akash
Sorry for posting it to here I too want to create it in new forum POST but I am not allowed to create new post. Might be some restrictions SET by Admin.
Thanx and Regards,
Akash
We will check why you are unable to post.
Could you add a
_navigateTo("your url")
or
_log("Starting");
or some such statement before getting the url?
I think, there may be a bug when the first statement is an _set statement.
Regards,
Narayan