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

I want to scroll down in MSPAINT (captured a screen already). So that I can read the data in it through the step Window(paint).GetVisibleText for my validation. Anyone know the scripting for this?

1 Answers   TCS,


whenever U using QTP,Test Director, Why we using separate Bug tracking tool?

1 Answers  


How u execute test cases in manual testing?

2 Answers   Accenture, Infosys,


How to create runtime property for an object?

0 Answers  


How u perform exception handling in QTp,what is other name for ths

1 Answers   Lehman Brothers,






What is post recovery scenario?

0 Answers  


when u script reveiwing in which area u more concentrates?

0 Answers   IBM,


Hi, I will provide perticular age,it needs to enter date in text box (MM/DD/YYYY) compare to system date. or already exist data in the text box.

2 Answers   Virtusa,


Explain how you can find length of array in qtp?

0 Answers  


In my QTP script I have a word in notepad that ends in a question mark, for example... "father?" As part of my script I want to delete the question mark. How do you delete a character in notepad?

4 Answers  


how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

0 Answers  


can test automation improve test effectiveness?

0 Answers  


Categories