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.
Getting a syntax error as missing ] after element list
Hi
i m using _getDB method for fetching data from excel but i am getting a syntax error as "missing ] after element list"
my code is :
var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=C:/sahi/Data1.xls;readOnly=false","","");
var $rs = db.select("select * from CreateUser");
createuser is my sheet name with Login and password are the col names..
var $loginid = $rs[0]["Login"];
var $password = $rs[0]["Password"];
login($loginid, $password);
this is my custom function to whom i am passing the data.
i m using _getDB method for fetching data from excel but i am getting a syntax error as "missing ] after element list"
my code is :
var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=C:/sahi/Data1.xls;readOnly=false","","");
var $rs = db.select("select * from CreateUser");
createuser is my sheet name with Login and password are the col names..
var $loginid = $rs[0]["Login"];
var $password = $rs[0]["Password"];
login($loginid, $password);
this is my custom function to whom i am passing the data.
Comments
Replace your table name with [CreateUser$] and it should work.
Please refer http://sahi.co.in/w/working-with-excel-sheets for more details
Cheers
dp