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 fails with Can't find method
Using the same .sah script on older versions of SAHI seems to work verys well. But trying to use the _execute() command on any of the newer versions of SAHI results in:
ERROR
Can't find method net.sf.sahi.util.Utils.executeCommand(string,string,number).
The Script:
_execute("explorer.exe", "true");
Running the SAHI file form the controller fails, but copying the command into the Record - Evaluate Expression windows, opens the explorer.exe but has a not at the bottom saying an exception was raised. The Sahi proxy logs no additional information.
I downloaded the latest Zip file, created the .sah file in userdata\scripts and ran the proxy from userdata\bin\start_sahi.bat - no modifications
sahi\lib does have ant-sahi.jar and decompiling the utils class in that jar has the method in question.
Please Help!!
ERROR
Can't find method net.sf.sahi.util.Utils.executeCommand(string,string,number).
The Script:
_execute("explorer.exe", "true");
Running the SAHI file form the controller fails, but copying the command into the Record - Evaluate Expression windows, opens the explorer.exe but has a not at the bottom saying an exception was raised. The Sahi proxy logs no additional information.
I downloaded the latest Zip file, created the .sah file in userdata\scripts and ran the proxy from userdata\bin\start_sahi.bat - no modifications
sahi\lib does have ant-sahi.jar and decompiling the utils class in that jar has the method in question.
Please Help!!
This discussion has been closed.
Comments
ie: _execute("explorer.exe");
_execute("explorer.exe", "true");
should now be
_execute("explorer.exe", true);
I am not sure how it used to work before; we will check.
Regards,
Narayan
Please let me know what changed as I now have a lot of scripts to edit.
Open Sahi/htdocs/spr/lib.js
Find:
replace it with:
Restart Sahi, and your older scripts should also work correctly.
We will add this to further releases.
Regards,
Narayan