We have 10 rows of records in data table, but we have to run
4th, 5th and 6th rows only. How can we handle this scenario
in QTP?

Answers were Sorted based on User's Feedback



We have 10 rows of records in data table, but we have to run 4th, 5th and 6th rows only. How can we..

Answer / vishakha b

Go to File => Settings. In 'Run' tab, choose the option,
Run from Row. Set '4 to 6' there.

Is This Answer Correct ?    26 Yes 2 No

We have 10 rows of records in data table, but we have to run 4th, 5th and 6th rows only. How can we..

Answer / punj

Datatable.setcurrentrow(4)
then use fpr loop, 4 to 6

Is This Answer Correct ?    7 Yes 3 No

We have 10 rows of records in data table, but we have to run 4th, 5th and 6th rows only. How can we..

Answer / qtp_beginner

DataTable.ImportSheet "C:\Users\Anil\Desktop\Testing_QTP.xls
",1,"Global"
numRow=DataTable.GlobalSheet.GetRowCount
msgbox numRow
For i=4 to 6
DataTable.SetCurrentRow(i)
disp=DataTable.Value ("Test",1)
msgbox disp

Next

Is This Answer Correct ?    4 Yes 1 No

We have 10 rows of records in data table, but we have to run 4th, 5th and 6th rows only. How can we..

Answer / litan

Both the answers were correct!

Is This Answer Correct ?    3 Yes 1 No

We have 10 rows of records in data table, but we have to run 4th, 5th and 6th rows only. How can we..

Answer / sandeep guttikonda

The abouve provided both answers are correct for this case.

Let me add some more to second answer:

In QTP Data Table Methods we have three methods to work on
rows:
1) SetCurretRow
2) SetNextRow
3) SetPrevRow

Here in our case the best method is SetCurrentRow.
1) SetCurrentRow: We can use this method to take a
specified row s current row in run time datatable. By
default QTP points to 1st Sheet 1st Row.

Syntax: SetCurrentRow(Row Number)

Code:
Datatable.SetCurrentRow(4)

For Current_Row = 4 to 6 step
/* To write the data into the datatable
Datatable.value(Current_Row, Column) = "Sandeep"
OR
/* To get data from the datatable.
Cell_Value = Datatable.value(Current_Row, Column)
Next

Note: Here the variable column is respective column number
on which we want to act.

Please le me know if you need any further info.

Thanks.

Regards,
Sandeep Guttikonda

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More QTP Interview Questions

can u tell me website address of VBscript with examples.

2 Answers  


Hi, When I click on a hyperlink a secondary pop-window will open. In that pop-up window there will be 'N' number of records arranged in with paging option in datagrid table. Each rows contains two columns, one is text and the other is a radio button. I will pass the first column value and based in it the tool have to select the corresponding radio button in that row. Please someone help me how to handle this as am new to QTP.

2 Answers   CTS,


After Creation of your QTp frame work, The folders are saved in VSS or Other. plz explain brifly?

3 Answers   Infosys,


Can any body explain me how to prepare QTP frame work with an example?? alexander.gdk@gmail.com

1 Answers  


What is the difference between client server application and web based application?

1 Answers   IBM,


Explain in brief about the quicktest professional automation object model?

0 Answers  


write the vb script for call to new action in qtp?

0 Answers  


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

0 Answers  


Hi all , I have installed the QTP 11.0 Whenever I am opening QTP that time if any open Internet Explorer I was getting message (Internet Explorer has encountered a problem and needs to close. we are sorry for inconvenience caused) and same way new browser also not opening. If you have any idea please let me know.

2 Answers   ME,


how to disable the pop ups through QTP using a script

0 Answers  


hi i want write code for "test engineer" in this i want write reverse how ca plz let me know through script

4 Answers  


I wnnt to learn about QTP Automation Framework,please give URL Address to get more information about AFW.

0 Answers   UHG,


Categories