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
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 |
Answer / punj
Datatable.setcurrentrow(4)
then use fpr loop, 4 to 6
| Is This Answer Correct ? | 7 Yes | 3 No |
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 |
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 |
How do we analyze the checkpoint results?
i need the word "good morning" to be displayed by default whenver we click upon the blank test while opening the qtp. Could you please answer...
X flies from Hyd to bangalore using different methods of transportation. write the test scenarios and test cases for this?
Basically why we need testing?
How many types of Recordings are there in QTP and what are they?
7 Answers Dangote, First Indian Corporation,
Hi Small doubt . i am working as Contract employee in XYZ comany thrw ABC Consultancy. so. How i write my resume ? In Professional experience Column. plz send urgent
· What should test in BANKING DOMAIN application ?
what is tool interface?
how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me
Hai Guys, can anybody show me how to write automaed test cases using VB scprit(examples)...i had an interviw soon...please guyz send as quickly as possible
Can the user toggle between using Local OR and shared OR for the same action?
Explain different types of action in qtp?