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.
Regarding writing data to excel sheet
Hi Sahi team,
i am trying to automate my project web application and i want to give demo to the clients.
so far every thing goes well, the only problem which i am facing is writing data/update date to excel sheet.
i am using below code to write date to excel sheet.
and my error log as below:
i am trying to get value form one of the text box in web page, but i am getting null value.
can please help for above issue.
OS: Window XP
Browser: IE8
build2011-07-19
Thanks,
Anilkumar
i am trying to automate my project web application and i want to give demo to the clients.
so far every thing goes well, the only problem which i am facing is writing data/update date to excel sheet.
i am using below code to write date to excel sheet.
_popup("IA")._setValue(_textbox("hardwareSKUNumber"), "12605657936");
var $textbox1value=_getValue(_textbox("hardwareSKUNumber"));
var dba =_getDB("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=D:\\Sahi\\Results.xls;readOnly=false", "", "");
//dba.update("insert into [Sheet1$] (simSKUNumber) values ('"+ $textbox1value"'))");
db.update("update [Sheet1$] set ESN=$textbox1value'");
and my error log as below:
_popup("IA")._setValue(_textbox("hardwareSKUNumber"), "12605657936"); at Mar 8, 2012 12:25:57 PM
_sahi.setServerVar('___lastValue___1331189757421', _getValue(_textbox("hardwareSKUNumber")));
TypeError: 'value' is null or not an object
No trace available
Click for browser script at Mar 8, 2012 12:26:09 PM
i am trying to get value form one of the text box in web page, but i am getting null value.
can please help for above issue.
OS: Window XP
Browser: IE8
build2011-07-19
Thanks,
Anilkumar
Comments
The problem solved by using following code, any way thanks,
_popup("IA")._setValue(_textbox("hardwareSKUNumber"), "12605657936");
var $textbox1value=null;
_popup("IA")._set($textbox1value,_textbox("hardwareSKUNumber").value);
var dba =_getDB("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=D:\\Sahi\\Results.xls;readOnly=false", "", "");
dba.update("insert into [Sheet1$] (ESN)values('"+ $textbox1value +"')");