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 connect to the mssql DB and execute excel framework
Hello,
I have installed Sahi 4.2 version and trying to execute db connection script but its not connecting, in controller getting failure message in logs am getting below error.
Cannot convert org.mozilla.javascript.NativeArray 4e4fc4 to byte[]
Total Memory in JVM (Xmx) is: 247.5 MB;
Memory currently in use is: 19.66796875 MB;
Memory increment during this test is: 0 MB
And
I have executed example of Excel framework given in demo folder but when i tried with my own example in controller I got success message but in log i got below error.
Total Memory in JVM (Xmx) is: 247.5 MB;
Memory currently in use is: 15.625 MB;
Memory increment during this test is: 0 MB
Can anyone help me ASAP
OS: Windows XP(32bit)
Browser: IE8
Sahi:4.2
Thanks,
Sowmya
I have installed Sahi 4.2 version and trying to execute db connection script but its not connecting, in controller getting failure message in logs am getting below error.
Cannot convert org.mozilla.javascript.NativeArray 4e4fc4 to byte[]
Total Memory in JVM (Xmx) is: 247.5 MB;
Memory currently in use is: 19.66796875 MB;
Memory increment during this test is: 0 MB
And
I have executed example of Excel framework given in demo folder but when i tried with my own example in controller I got success message but in log i got below error.
Total Memory in JVM (Xmx) is: 247.5 MB;
Memory currently in use is: 15.625 MB;
Memory increment during this test is: 0 MB
Can anyone help me ASAP
OS: Windows XP(32bit)
Browser: IE8
Sahi:4.2
Thanks,
Sowmya
Comments
I think the second one is not an error. The script is passed.
Before going to connect u have to connect that file through ODBC or JDBC driver.
Can you tell me which db you are going to connect. I could not get your scenario.
Anyway just try this.
control panel=>Administrative tools=>Data sources(ODBC)
Here you can add your excel file
Steps I followed:
> Placed sqljdbc4.jar in extlib folder
> Set the class path in sahi.bat and dashboard.bat
My script to connect to the DB and execution of query is as follows
var db=_getDB("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://ip;DatabaseName=QA_NEW", "sa", "admin!2#");
_writeFile(db.select("select * from person where Pid = '8943'"), "D:/Sahi/userdata/scripts/person.csv",true);