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
How to add object to object repository in qtp9.0 Suppose for brower yahoo home page
How to find array size in qtp?
Name the different types of recording modes?
can i change the runtime properties of an object ? How can i check if a parameter exists in database ?
Explain the terms test and business component?
what is actually contain test report? can anybody post the test report
Is it possible to call win runner script in qtp?
Can U Explain about QTP tool from older version to latest version also its differences?
what is the mail use of frame work(with detail). architecture for keyword driven frame work
This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?
How software tester can use constants and variables in scripts?
Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work
What are the features supported by UFT?
How to recognise the webelement and verifying that webelement is enabled?
Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?