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

What is the use of Accessibility check point?

3 Answers  


There is web page with the webtable,this contains some data, how do you manipulate the data.

2 Answers   Tech Mahindra,


Hi, Any one have the crack for QTP 10.0,if so could you please send it to phanijuly10@gmail.com

2 Answers  


Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.

0 Answers  


We have 10 rows in datatable at runtime we get error at 3rd row ? what is the procedure for continuing same test from 4th row on wards?

10 Answers  






What is obsolute path and relative path in QTP..? How to access them and what are the differences between them...??

3 Answers   Virtusa,


Can I change properties of a test object?

0 Answers  


It is very difficult to test in manual for that we go to DATA DRIVEN TEST.

3 Answers  


How can i open a file in Textpad and replace a string with another using QTP

1 Answers   Wipro,


How to add object to object repository in qtp9.0 Suppose for brower yahoo home page

0 Answers  


Explain process of smart Identification in QTP?

0 Answers  


What is the maximum size of Object Repository in QTP 8.2?

4 Answers   Mphasis,


Categories