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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

1.Write a CRITICAL test cases for calculator ? 2.What is the difference b/w FRS and SRS documents ? 3.What is Component ? 4.What is object ? 5.what is the difference b/w static and dynamic descriptive programming ?

1592


what you mean by artifact,milestone...

1499


How to create a standard checkpoint ?

561


How many types of object repository in qtp?

610


Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

591






Where to use function or action?

669


Give the syntax to load function at run time.

631


Explain different type of event trigger option.

544


What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?

704


With what extension you can save the list of tests in a file to run in test batch runner?

571


i'm using the qtp to test to vb appliction,i wanted to get the new application's title.i didn't want to use the winAPI to get it ,i 'd like to know whether a QTP function can do it. Eg: SystemUtil.Run "C:\Program Files\.....","","","" 'run an application, and misure the application is activating,then how to get the hwn wihtout using windowns api

1497


What is smart identification in QTP?

634


How can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)

1530


How you can decide which type of object repository you have to use?

707


Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?

1487