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

What is the difference between gettoproperty and settoproperty?Explain with an example?

4 Answers   QQS, Satyam,


explain how to write vb script in qtp?when will you write own script?

0 Answers   FirstApex,


Hi, is it possible for recording shortcut key during record session? The application on which I am working is web based application. This application has several shortcut key associated with menu option. I have succesfully recorded all menu option but unable to record shortcut key.

0 Answers  


how to disable the pop ups through QTP using a script

0 Answers  


Interviwer asked, How many years exper.. on QTP? I said, total 2 yrs exp in manual and QTP. QTP only current project arround 3 months. then interviewer ask , HOW BOLD YOU QTP? What you say?

1 Answers  






Why do we use text checkpoint as we can make use of the same in the standard check point?

3 Answers   IBM,


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

0 Answers  


How to create frame work for qtp?

1 Answers   Bank Of America, Polaris,


How to get the column count and column name from the resultset in the database connection program?

6 Answers  


What is the another extention name of library file.If that is exist than what's the differnce between them.

1 Answers   Synechron,


Explain about invoking of application?

2 Answers  


what is the advantages and disadvantages of using functions instead of re usable actions

0 Answers  


Categories