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 can I execute .exe file in sahi
Hi,
This is lokesh, I am new for this tool, and when I am recording my application few objects are not recognizing so for those objects I am recording through Auto Hot key software and converting as exe file so I want to run that exe file in sahi so can any guide me what is the syntax for execute exe file.
Thanks in Advance,
Lokesh.
OS-Windows-7
Browser IE-9
Sahi- V3.5
This is lokesh, I am new for this tool, and when I am recording my application few objects are not recognizing so for those objects I am recording through Auto Hot key software and converting as exe file so I want to run that exe file in sahi so can any guide me what is the syntax for execute exe file.
Thanks in Advance,
Lokesh.
OS-Windows-7
Browser IE-9
Sahi- V3.5
Comments
I don't know if .exe is working, but this may be helpful
http://sahi.co.in/w/_execute
Regards
Wormi
I have tried that one but it's not worked
Thanks
Lokesh.
Its possible to execute .exe file from batch file. You can prepare one batch file with proper path to execute your .exe file.
And sahi can execute batch file with the _execute API suggest by Wormi.
For e.g.
////// Batch File Something.bat //////
start /d "path" file.exe
// Content of Batch File////////////
////////////////////////////////////////////////
And in Sahi script you can use _execute("Something.bat"); that will execute your required .exe file.
Let me know if you are facing any issue with above suggest method.
I have tried the same way but it did not worked, if I run individually the .bat or .exe file it's working fine when I incorporate this _execute command in sahi script it's not working.
in below example executing 1st, 2nd, but 3rd step skipping and after execute 4th step moving to 5th step here it's failing.
1. _click(_image("Functions[2]"));
2. _click(_link("Attachment Type Displayed Attributes"));
3. _execute("Batch.bat");
4. _wait(2000);
5. _click(_cell("Drawing"));
6. _click(_button("Add System Attribute"));
_popup("addDisplayAttribute")._click(_link("Browse"));
Thanks,
Lokesh.
Can you post the contents of Sahi console? Post the <browser_types> contents of IE9 by clicking on the configure on the Dashboard.
Also, let me know if the step no 3 is been skipped in all other browsers as well.
Regards
Sumitra
I am unable to send which you asked things, the following error shows.
New Members can not post links, images or email addresses until they become more active.
Thanks,
Lokesh.
You can send it to support@sahi.co.in.
Regards
Sumitra
You can execute anything that can run on the command line via _execute.
Instead of using
_execute("Batch.bat");
try with
_execute("D:\\full\\path\\to\\Batch.bat");
Regards,
Narayan
I have tried both ways but no use.
_execute("Batch.bat");
_execute("C:\Users\lokeshk\sahi\userdata\scripts\Batch.bat");
Thanks,
Lokesh.
It should be:
_execute("C:\\Users\\lokeshk\\sahi\\userdata\\scripts\\Batch.bat");
or
_execute("C:/Users/lokeshk/sahi/userdata/scripts/Batch.bat");
Regards
Sumitra
It's working now.
Thanks,
Lokesh.
One more doubt when I am running sahi other site's are blocking (ex:- outlook etc.,)
Is there any setting to run both sahi & outlook simultaneously.
Thanks,
Lokesh.
try to add the blocked sites to your "exclude proxy" settings. This is a lot of work when you got many sites but unfortunately i do not know a better solution