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.
How to display null value
Hi,
Gunjan here.
When i used For loop to submit multiple claims in this claim submission process.
There is 1 form in this form some mandatory questions now suppose that if i want to give answer of the question is related to 1st claim but it is also possible that is not related to 2nd claim
so,can u plz help me what should i do?
My script is given below
function contactInfo($fname,$lname,$daytimephone1,$daytimephone2,$email,$year,$make,$model,$submodel,$color,$bodypanel,$dent,$glass_lamps,$damage,$int_comp,$ed,$es,$et1,$tire1,$tire2,$location,$zip,$street,$vqs,$ownershiptype, $ownername,$titleinstate,$referralid)
{
_setValue(_textbox("FirstName"), $fname);
_setValue(_textbox("LastName"), $lname);
_setValue(_textbox("idCellPhone1"), $daytimephone1);
_setValue(_textbox("idCellPhone2"), $daytimephone2);
_setValue(_textbox("idMail"), $email);
_setSelected(_select("YearID"), $year);
_setSelected(_select("MakeID"), $make);
_setSelected(_select("ModelID"), $model);
_setSelected(_select("SubModelID"), $submodel);
_setSelected(_select("idcolors"), $color);
_setSelected(_select("txtQ_VC_BodyPanel"),$bodypanel );
_setSelected(_select("txtQ_VC_Dent"), $dent);
_setSelected(_select("txtQ_VC_Glass_Lamps"), $glass_lamps);
_setSelected(_select("txtQ_VC_Damage"), $damage);
_setSelected(_select("txtQ_VC_Int_comp"), $int_comp);
_setSelected(_select("txtQ_VC_ED"), $ed);
_setSelected(_select("txtQ_VC_ES"), $es);
_setSelected(_select("txtQ_VC_ET1"), $et1);
_setSelected(_select("txtQ_VC_Tire1"), $tire1);
_setSelected(_select("txtQ_VC_Tire2"), $tire2);
_setSelected(_select("idLocationType"), $location);
_setValue(_textbox("Zip"), $zip);
_setValue(_textbox("Street"), $street);
_setSelected(_select("vqs"), $vqs);
_setSelected(_select("idOwnershipType"), $ownershiptype);
_setValue(_textbox("txtRRQ_OWNER_NAME"), $ownername);
_setSelected(_select("idTitleInState"), $titleinstate);
_setSelected(_select("ReferralID"),$referralid);
}
// Get the DB instance
var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)}; DBQ=C:\\Test Data\\Book4.xls;readOnly=false", "", "");
$rs = db.select("select * from [Sheet1$]");
for(var $i=0; $i<$rs.length; $i++)
{
contactInfo($rs[$i]["FirstName"], $rs[$i]["LastName"], $rs[$i]["idCellPhone1"], $rs[$i]["idCellPhone2"], $rs[$i]["idMail"], ""+parseInt($rs[$i]["YearID"]), $rs[$i]["MakeID"],$rs[$i]["ModelID"],$rs[$i]["SubModelID"],$rs[$i]["idcolors"],$rs[$i]["txtQ_VC_BodyPanel"],$rs[$i]["txtQ_VC_Dent"],$rs[$i]["txtQ_VC_Glass_Lamps"],$rs[$i]["txtQ_VC_Damage"],$rs[$i]["txtQ_VC_Int_comp"],$rs[$i]["txtQ_VC_ED"],$rs[$i]["txtQ_VC_ES"],$rs[$i]["txtQ_VC_ET1"],$rs[$i]["txtQ_VC_Tire1"],
$rs[$i]["txtQ_VC_Tire2"],$rs[$i]["idLocationType"],""+parseInt($rs[$i]["Zip"]),$rs[$i]["Street"],$rs[$i]["vqs"],$rs[$i]["idOwnershipType"],$rs[$i]["txtRRQ_OWNER_NAME"],$rs[$i]["idTitleInState"],$rs[$i]["ReferralID"]);
_click(_button("Submit"));
_wait(15000,_exists(elememt));
}
_click(_link("Logout"));
I want to capture data from excel sheet and send it on browser
My excel sheet is given below
No. FirstName LastName idCellPhone1 idCellPhone2 idMail YearID
1. prapti gajera 987 1020304 p@g.com 1998
2. bhakti malvia 798 6757656 b@m.com 1983
3. priyal dalsania 908 1236754 p@d.com 1993
No. MakeID ModelID SubModelID idcolors txtQ_VC_BodyPanel
1. Eagle Talon Base Yellow Yes
2. Mercedes-Benz 240-Class 240D White No
3. Mazda B-Series Pickup B2200 Red Yes
No. txtQ_VC_Dent txtQ_VC_Glass_Lamps txtQ_VC_Damage txtQ_VC_Int_comp
1. Yes Yes No Yes
2. Yes No Yes No
3. Yes Yes No Yes
No. txtQ_VC_ED txtQ_VC_ES txtQ_VC_ET1 txtQ_VC_Tire1 txtQ_VC_Tire2
1. Yes
Yes
2. No No Yes No Yes
3. Yes ---- ---- --- Yes
No. idLocationType Zip Street vqs idOwnershipType
1. Residence 78727 ABC Front yard Documented
2. Residence 30030 GEF Street Documented
3. Residence 10010 BCD Back yard Documented
No. txtRRQ_OWNER_NAME idTitleInState ReferralID
1. poonam FL - Select affiliate -
2. trupti TX - Select affiliate -
3. priti CO - Select affiliate -
Can u plz help me how to solve this problem?
i m using os: windows7 sahi: V3.5 and browser: Fire fox version 5.0
Thanks,
Gunjan.
Gunjan here.
When i used For loop to submit multiple claims in this claim submission process.
There is 1 form in this form some mandatory questions now suppose that if i want to give answer of the question is related to 1st claim but it is also possible that is not related to 2nd claim
so,can u plz help me what should i do?
My script is given below
function contactInfo($fname,$lname,$daytimephone1,$daytimephone2,$email,$year,$make,$model,$submodel,$color,$bodypanel,$dent,$glass_lamps,$damage,$int_comp,$ed,$es,$et1,$tire1,$tire2,$location,$zip,$street,$vqs,$ownershiptype, $ownername,$titleinstate,$referralid)
{
_setValue(_textbox("FirstName"), $fname);
_setValue(_textbox("LastName"), $lname);
_setValue(_textbox("idCellPhone1"), $daytimephone1);
_setValue(_textbox("idCellPhone2"), $daytimephone2);
_setValue(_textbox("idMail"), $email);
_setSelected(_select("YearID"), $year);
_setSelected(_select("MakeID"), $make);
_setSelected(_select("ModelID"), $model);
_setSelected(_select("SubModelID"), $submodel);
_setSelected(_select("idcolors"), $color);
_setSelected(_select("txtQ_VC_BodyPanel"),$bodypanel );
_setSelected(_select("txtQ_VC_Dent"), $dent);
_setSelected(_select("txtQ_VC_Glass_Lamps"), $glass_lamps);
_setSelected(_select("txtQ_VC_Damage"), $damage);
_setSelected(_select("txtQ_VC_Int_comp"), $int_comp);
_setSelected(_select("txtQ_VC_ED"), $ed);
_setSelected(_select("txtQ_VC_ES"), $es);
_setSelected(_select("txtQ_VC_ET1"), $et1);
_setSelected(_select("txtQ_VC_Tire1"), $tire1);
_setSelected(_select("txtQ_VC_Tire2"), $tire2);
_setSelected(_select("idLocationType"), $location);
_setValue(_textbox("Zip"), $zip);
_setValue(_textbox("Street"), $street);
_setSelected(_select("vqs"), $vqs);
_setSelected(_select("idOwnershipType"), $ownershiptype);
_setValue(_textbox("txtRRQ_OWNER_NAME"), $ownername);
_setSelected(_select("idTitleInState"), $titleinstate);
_setSelected(_select("ReferralID"),$referralid);
}
// Get the DB instance
var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)}; DBQ=C:\\Test Data\\Book4.xls;readOnly=false", "", "");
$rs = db.select("select * from [Sheet1$]");
for(var $i=0; $i<$rs.length; $i++)
{
contactInfo($rs[$i]["FirstName"], $rs[$i]["LastName"], $rs[$i]["idCellPhone1"], $rs[$i]["idCellPhone2"], $rs[$i]["idMail"], ""+parseInt($rs[$i]["YearID"]), $rs[$i]["MakeID"],$rs[$i]["ModelID"],$rs[$i]["SubModelID"],$rs[$i]["idcolors"],$rs[$i]["txtQ_VC_BodyPanel"],$rs[$i]["txtQ_VC_Dent"],$rs[$i]["txtQ_VC_Glass_Lamps"],$rs[$i]["txtQ_VC_Damage"],$rs[$i]["txtQ_VC_Int_comp"],$rs[$i]["txtQ_VC_ED"],$rs[$i]["txtQ_VC_ES"],$rs[$i]["txtQ_VC_ET1"],$rs[$i]["txtQ_VC_Tire1"],
$rs[$i]["txtQ_VC_Tire2"],$rs[$i]["idLocationType"],""+parseInt($rs[$i]["Zip"]),$rs[$i]["Street"],$rs[$i]["vqs"],$rs[$i]["idOwnershipType"],$rs[$i]["txtRRQ_OWNER_NAME"],$rs[$i]["idTitleInState"],$rs[$i]["ReferralID"]);
_click(_button("Submit"));
_wait(15000,_exists(elememt));
}
_click(_link("Logout"));
I want to capture data from excel sheet and send it on browser
My excel sheet is given below
No. FirstName LastName idCellPhone1 idCellPhone2 idMail YearID
1. prapti gajera 987 1020304 p@g.com 1998
2. bhakti malvia 798 6757656 b@m.com 1983
3. priyal dalsania 908 1236754 p@d.com 1993
No. MakeID ModelID SubModelID idcolors txtQ_VC_BodyPanel
1. Eagle Talon Base Yellow Yes
2. Mercedes-Benz 240-Class 240D White No
3. Mazda B-Series Pickup B2200 Red Yes
No. txtQ_VC_Dent txtQ_VC_Glass_Lamps txtQ_VC_Damage txtQ_VC_Int_comp
1. Yes Yes No Yes
2. Yes No Yes No
3. Yes Yes No Yes
No. txtQ_VC_ED txtQ_VC_ES txtQ_VC_ET1 txtQ_VC_Tire1 txtQ_VC_Tire2
1. Yes
Yes
2. No No Yes No Yes
3. Yes ---- ---- --- Yes
No. idLocationType Zip Street vqs idOwnershipType
1. Residence 78727 ABC Front yard Documented
2. Residence 30030 GEF Street Documented
3. Residence 10010 BCD Back yard Documented
No. txtRRQ_OWNER_NAME idTitleInState ReferralID
1. poonam FL - Select affiliate -
2. trupti TX - Select affiliate -
3. priti CO - Select affiliate -
Can u plz help me how to solve this problem?
i m using os: windows7 sahi: V3.5 and browser: Fire fox version 5.0
Thanks,
Gunjan.
This discussion has been closed.
Comments
Thanks,
Gunjan.