For the below written code , i want to be stop the loop
(ex:10 times), but it is focusing to first line of the code
& generating error.


vbwindow("vbname:=frmMain").Type micAltDwn + "6" + "2" + "D"
+micAltUp 'wiil open the particular window in application
vbwindow("vbname:=frmDeduction").vbbutton("vbname:=cmdNew").Click

DataTable.ImportSheet"F:\QTP VBScript\Form
26-1.xls","Deduction",Global

RowCount = DataTable.GetSheet("Global").GetRowCount
i=RowCount

For j =1 to i

'vbwindow("vbname:=frmDeduction").WinObject("nativeclass:=DataComboWndClass","abs_y:=
187").Type DataTable("Name", dtGlobalSheet)
vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
187").Type DataTable("Name", dtGlobalSheet)
vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
187").Type micF4
vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
187").Type micTab

vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
216").Type micF4
vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
216").Type DataTable("Section", dtGlobalSheet)
vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
216").Type micTab


vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtOfPay").Set
DataTable("Amount_of_Payment", dtGlobalSheet)
vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Set
DataTable("Amount_PaidCredited_Date", dtGlobalSheet)

vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Type
micTab

vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
316").Type micF4
vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
316").Type DataTable("Deduction_is", dtGlobalSheet)
vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:=
316").Type micTab

vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdSave").Click

DataTable.SetNextRow
Next

vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdClose").Click


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More QTP Interview Questions

How you can find length of array in qtp?

0 Answers  


Can we use smart identification in Keyword Driven approach? If yes , How we can use. Please Explain?

1 Answers  


how can we know the program is testing by multiple test data in data driven frame work?

1 Answers   CTS,


1) after inserting the check point how to change the expected value that was captured while inserting the check point

2 Answers   TCS,


What is DOM

2 Answers  






how to retrieve data from the data table (from a particular cell)

7 Answers   Cap Gemini,


Login to flight app, in window flight reservation set the date field and select flyfrom as Frankfurt and verify whether flyto list box has the item FrankFurt, log the results.

1 Answers   Cap Gemini,


How to create a Runtime property for an object in QTP?

6 Answers  


What is the difference between per-action and shared?

0 Answers  


What is the life cycle of QTP? Pls Give me Exact answer?

6 Answers   Google,


what kind of erros can be handled with the using QTP?

2 Answers   CTS, Satyam,


diff between winrunner and qtp

1 Answers   Wipro,


Categories