HI,
Based On The Information Below Write A Data Driven test
Script
Edit Box 1 Should take Value From Num1 Column
Edit Box 2 Should take Value From Num2 Column
Click On Add Button,
Get The Value Of Exp res Column,
Get Value From Actual Result Edit Box ,
Compare Two Values, Write Pass / Fail Value Into Result
Column
Thanks In Advance... Kavitha
Input.Xls
Num1 Num2 Exp res Act res Result
10 30 40 40 Pass
50 40 90 90.5 -
- - - - -
- - - - -
- - - - -
Answer Posted / saravanaraja
Here A = First Input; B= second Input ; C= Expected Result
D= Actual Result; E= Status
Set ex=createobject("Excel.Application")
Set a=ex.workbooks.open("C:\Documents and
Settings\Administrator\Desktop\cms_code.xls")
Set b=a.worksheets("sheet2")
For i=1 to 13
f=b.cells(i,"A").Value
g=b.cells(i,"B").Value
h=f+g
b.cells(i,"D").Value=h
If b.cells(i,"C").Value= b.cells(i,"D").Value Then
b.cells(i,"E").Value ="Pass"
Else
b.cells(i,"E").Value ="Fail"
End If
Next
a.save
a.close
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
In what occasion we can specify global sheet and action sheet?
What are the methods of the TextStream object that are used for reading from a text file?
What is checkpoint in qtp?
There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code
What are the Test design techniques you uses in ur project?
I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.
What is expert view and keyword view?
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks
How do you configure QTP AND Test director?
Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji
Tell some commonly used Excel VBA functions?
can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined