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 |
whai is meant by automation testing?
setroproperty and getroproperty difference
How to find the number the number of Links, Brolken Links in a webpage?
if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp
in QTP, we have options like (record and play,recording modes(normal,analog,low level),object identification,smart identification,object repository,synchronizing test,transactions,checkpoints(std,bitmap,text,text area,DB,XML,accessibility),regular expression,actions,data driving,parameter,parameterization,data tables,recovery scenario(pop up,object state,test run error,application crash). real time users of QTP, pls say and when and at what point u have used all these options ,in ur concerned project.pls give me explanation in accordance with ur real time project handled. real users pls send some time in the aboue case. if u can send the the reply through allinterview or at ref_it_ref@yahoo.co.in
Explain synchronization types in QTP
What is use of object spy?
Hello Guys, Can anybody Explain me about Automation framework?? and how can we prepareAutomation Framework using QTP
How will you load few objects in Active Screen?
What is the keyword view and expert view in qtp?
Did you use flatfiles in your projects?At what situation you used it?How can you upload flatfiles?
How to automate the windows dialog box which is coming in the run mode? Whenever I run my scripts,I am getting dialog box ( for ex: Pls enter zipcode" eventhough I already entered the value,the dialog box pops up).I need to click it. Pls give some idea-How to automate the dialog box which is pop up in the runtime.