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

is it possible to change the date format like MM/DD/YY into DD/MM?YY through script in QTP

5 Answers   IBM,


What is output value in QTP? Why do we use the output value in QTP?How many types of output values are there in QTP? what are their respective usage in QTP?

14 Answers   IBM,


Give me an example where you have used a COM interface in your QTP project?

1 Answers  


Give the syntax to import/export xls into qtp.

0 Answers  


What is the extension of script and object repositary files?

2 Answers  


What the genaric function to connect Sql Server using Sql Server Authentication and Windows Authentication

1 Answers  


in qtp how i can retrive from a browser how many links are there.means total no of links used in a browser

4 Answers   Verizon,


In an Excel sheet take two fields as agentname and password and type some valid agentname and password.call that excel sheet in qtp so that qtp opens the flightreservation window taking into consideration how many records are entered in the excel sheet.For example if 3 records are entered today it will open 3 FR windows,if in near future the records are more than 3 then it will open that number of times.

3 Answers  


What are the differences between QTP 9.2 and 10? please explain e indetail......

2 Answers   Wipro,


How many types of recording modes in the qtp?

0 Answers  


How to capture screenshots of Exceptions/Errors during run- time?

12 Answers   Ordain Solutions,


datatable.Import("E:\Programming Samples\QTP Samples\OrderNumbers.xls") Asume we have 4 records in datatable Code reads the 4 rows in the sheet ok, but does it 5 times? It doesn't sound like closing the datasheet is the problem Can we close the datasheet runtime ?

2 Answers  


Categories