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.
SAHI_ERROR displayed on page while playing back the script.
Hi All,
Blank page with SAHI_ERROR message displayed while executing the script.
Script as below...
_setValue(_textbox("ctl00\$cphPage\$txtUserName"), "maheshpb");
_click(_submit("Login"));
_assertEqual("Expenses Reimbursement Voucher", _getText(_cell("Expenses Reimbursement Voucher[1]")));
_assertEqual("Date:", _getText(_cell("Date:")));
_assertEqual("19-Apr-2012", _getText(_span(0,_near(_cell("Date:")))));
_assertEqual("Note : All Fields marked as * are mandatory",_getText(_cell(0,_under(_cell("Date:")))));
_assertEqual("Emp No:",_getText(_cell(1,_under(_cell("Date:")))));
_assertEqual("3545", _getText(_span(0,_near(_cell("Emp No:")))));
_click(_link("Expenses Reimbursement Voucher"));
_setValue(_textarea("ctl00\$cphPage\$TxtPerticulars"), "expenses");
_setFile(_file("ctl00\$cphPage\$VoucherdocUpload"), "");
_click(_image("calendar image"));
_click(_cell("13"));
_setSelected(_select("ctl00\$cphPage\$GvCashPay\$ctl02\$DrpAccount"), "Gas & utilities-Office Premises");
_setValue(_textarea("ctl00\$cphPage\$GvCashPay\$ctl02\$TxtDetails"), "Test data");
_setValue(_textbox("ctl00\$cphPage\$GvCashPay\$ctl02\$TxtAmount"), "1234");
_click(_submit("Save "));
$Query = "select max(vouchersequenceid)+1 from voucherheader where fiscalyear = 2011 and empid ="+ $empno;
$voucherno = ""+$db2.select($Query);
_assertEqual("Voucher No. "+$voucherno+" Saved Successfully.", _getText(_span(1,_under(_cell("Expenses Reimbursement Voucher[1]")))));
Console log:
Apr 19, 2012 9:30:25 AM net.sf.sahi.command.FileUpload appendFiles
INFO: Uploading: fileName = resolved to C:\Documents and Settings\mohitkumar105
30\sahi\userdata
Apr 19, 2012 9:30:25 AM net.sf.sahi.command.CommandExecuter execute
WARNING: commandClass = >net.sf.sahi.command.FileUpload< commandMethod = >append
Files<
Apr 19, 2012 9:30:25 AM net.sf.sahi.command.CommandExecuter execute
WARNING: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sf.sahi.command.CommandExecuter.execute(CommandExecuter.java:55)
at net.sf.sahi.command.MockResponder.getResponse(MockResponder.java:64)
at net.sf.sahi.ProxyProcessor.handleDifferently(ProxyProcessor.java:162)
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:142)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:93)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.sahi.util.FileIsDirectoryException
at net.sf.sahi.util.Utils.readFile(Utils.java:171)
at net.sf.sahi.util.Utils.readFile(Utils.java:158)
at net.sf.sahi.command.FileUpload.appendFiles(FileUpload.java:83)
... 10 more
After executing Save it doesnt perform and displaye SAHI_ERROR message on the screen.
No error message in log file even some timesa log it self not generated.
After stopping thr script log got generated but no error in the log file.
Few times there was one error message Action did not complete in 150 seconds but the step displayed in after SAVE.
I have completed one application successfully .
Now i am working on 2nd application dont know whay this error is comming .
Please help.
Mohit
Blank page with SAHI_ERROR message displayed while executing the script.
Script as below...
_setValue(_textbox("ctl00\$cphPage\$txtUserName"), "maheshpb");
_click(_submit("Login"));
_assertEqual("Expenses Reimbursement Voucher", _getText(_cell("Expenses Reimbursement Voucher[1]")));
_assertEqual("Date:", _getText(_cell("Date:")));
_assertEqual("19-Apr-2012", _getText(_span(0,_near(_cell("Date:")))));
_assertEqual("Note : All Fields marked as * are mandatory",_getText(_cell(0,_under(_cell("Date:")))));
_assertEqual("Emp No:",_getText(_cell(1,_under(_cell("Date:")))));
_assertEqual("3545", _getText(_span(0,_near(_cell("Emp No:")))));
_click(_link("Expenses Reimbursement Voucher"));
_setValue(_textarea("ctl00\$cphPage\$TxtPerticulars"), "expenses");
_setFile(_file("ctl00\$cphPage\$VoucherdocUpload"), "");
_click(_image("calendar image"));
_click(_cell("13"));
_setSelected(_select("ctl00\$cphPage\$GvCashPay\$ctl02\$DrpAccount"), "Gas & utilities-Office Premises");
_setValue(_textarea("ctl00\$cphPage\$GvCashPay\$ctl02\$TxtDetails"), "Test data");
_setValue(_textbox("ctl00\$cphPage\$GvCashPay\$ctl02\$TxtAmount"), "1234");
_click(_submit("Save "));
$Query = "select max(vouchersequenceid)+1 from voucherheader where fiscalyear = 2011 and empid ="+ $empno;
$voucherno = ""+$db2.select($Query);
_assertEqual("Voucher No. "+$voucherno+" Saved Successfully.", _getText(_span(1,_under(_cell("Expenses Reimbursement Voucher[1]")))));
Console log:
Apr 19, 2012 9:30:25 AM net.sf.sahi.command.FileUpload appendFiles
INFO: Uploading: fileName = resolved to C:\Documents and Settings\mohitkumar105
30\sahi\userdata
Apr 19, 2012 9:30:25 AM net.sf.sahi.command.CommandExecuter execute
WARNING: commandClass = >net.sf.sahi.command.FileUpload< commandMethod = >append
Files<
Apr 19, 2012 9:30:25 AM net.sf.sahi.command.CommandExecuter execute
WARNING: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sf.sahi.command.CommandExecuter.execute(CommandExecuter.java:55)
at net.sf.sahi.command.MockResponder.getResponse(MockResponder.java:64)
at net.sf.sahi.ProxyProcessor.handleDifferently(ProxyProcessor.java:162)
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:142)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:93)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.sahi.util.FileIsDirectoryException
at net.sf.sahi.util.Utils.readFile(Utils.java:171)
at net.sf.sahi.util.Utils.readFile(Utils.java:158)
at net.sf.sahi.command.FileUpload.appendFiles(FileUpload.java:83)
... 10 more
After executing Save it doesnt perform and displaye SAHI_ERROR message on the screen.
No error message in log file even some timesa log it self not generated.
After stopping thr script log got generated but no error in the log file.
Few times there was one error message Action did not complete in 150 seconds but the step displayed in after SAVE.
I have completed one application successfully .
Now i am working on 2nd application dont know whay this error is comming .
Please help.
Mohit
Comments
and say that you somehow try to save your userdata dir.. maybe you specified a path wrong somewhere?
Regards
Wormi
Thanks for the reply.
But i am not providing any path in the script.
Could you please provide me more inputs .where to check if any thing wrong with SAHI tool.
Not able to find any solution.
And also i have obserevrd that some time it works fine. means there is no problem with script.
I think there is some issue with configuration.may be...not sure..
Mohit
Actualy i have modified start.bat file to access data base as below
@ECHO ON
SET SAHI_HOME=..\..
SET SAHI_USERDATA_DIR=..
SET SAHI_EXT_CLASS_PATH=..\..\extlib\db\sqljdbc4.jar;
CALL %SAHI_HOME%\bin\dashboard.bat
and also i have created a new folder as db at ...extlib\db\sqljdbc4.jar and placed sqljdbc4.jar file in that folder.
I have reinstalled SAHI to check if something wrong with any files.
Its working filne without modification for database access.
Now i have again modified the files and created folder to access the database and its not working.
Same error comming as posted in my 1st post.
Please suggest if solution anything wrong with database modification.
Mohit
Now its working fine.
Please close this post.
Mohit