IN EXCEL SHEET OF qtp SUPPOSE I ENTERED 10 NUMBERS RANDOMLY
I HAVE TO GET TOTAL OF TEN NUMBERS IN THE 11 COLUMN USING qtp
GIVE CODE TO IT USING qtp
Answers were Sorted based on User's Feedback
Answer / sudha sharma
Pre Condition : Enter 10 randon numbers in the datatable of
QTP. Write down the following code :
For i=1 to 10
datatable.SetCurrentRow(i)
total=cint(datatable.Value(1,1))+total
Next
datatable.SetCurrentRow(i)
datatable.value(1,1)=total
The total of 10 random numbers get posted in the run time
data table. You can view it through automation -> results -
> run time data table.
This is for QTP data table. If the data is in the excel
sheet then you have import the data.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / laxmi
datatable.ImportSheet "C:\Documents and
Settings\Administrator\Desktop\excel.xls",1,Global
then go to test->settings->run->check run one iteration
radio button
or i= datatable.ImportSheet "C:\Documents and
Settings\Administrator\Desktop\excel.xls",1,Global
for i=1
//body
next
| Is This Answer Correct ? | 2 Yes | 2 No |
1. How to capture data from images in QTP and produce them in Excel sheet
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.
Can any body tell me what is the method to connect the remote desk top throw QTP 9.2 version?
How many test scripts are prapare in ur project(HeathCare Insurance).
how to do the batch testing in test director using manual testing procedure?
in how many ways you perform batchtesting?
How to do Batch run in qtp? provide the steps?
Which Databases supports for QTP?
How to pass parameters into an action.Please explain me with examples
HOW TO FIND WEBTABLE? HOW TO RETRIVE THE WEBTABLE VALUES? PLZ TELL ME THE PROCEDURE.
What do you mean by iteration?
What is VSS? Is it used in Automation(QTP) Or Manual? what is menus in VSS?