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.
_execute command cannot run batch file
Hi!
I'm new to sahi and am having a problem running a batch file using the _execute command. I tried
_execute("C:\sahi\scripts\call.bat")
but it will not work.
The batch file contains an executable file that I want to run in sahi. I tried to run the batch file only and it works just fine.
Is there another way to run an executable file in sahi that does not anymore include the need of a batch file?
Do the batch and .exe files have to be in the same directory as the script?
Would really appreciate help.
Thanks!
I'm new to sahi and am having a problem running a batch file using the _execute command. I tried
_execute("C:\sahi\scripts\call.bat")
but it will not work.
The batch file contains an executable file that I want to run in sahi. I tried to run the batch file only and it works just fine.
Is there another way to run an executable file in sahi that does not anymore include the need of a batch file?
Do the batch and .exe files have to be in the same directory as the script?
Would really appreciate help.
Thanks!
Comments
_execute("C:\\sahi\\scripts\\call.bat");
Since Sahi's working directory is sahi/bin, make sure that the batch file runs correctly from there.
Thanks for the advice. Unfortunately, your suggestion still could not run the batch file.
Thanks!
__setGlobal("resetDir", "C:\\\\Users\\\\");
_execute(_getGlobal("resetDir") + "compileClearDatabase.bat", "true");
the execute command is defined as: Hope this is of help.
Donna