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
when a test case is written how u test using qtp
Is the qtp course will help to create a virtual object?
How do you create new test sets in td?
who QTP recognizes the object stored in object repository?
What is the standard timing delay for web based application in qtp?
Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?
What are the different attributes used with regular expression?
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
What are the five challenges you faced in QTP?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..
write the vb script for call to new action in qtp?
How to open a new test using quicktest professional (qtp)?
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
What are the data types in qtp?
Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?