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
What is the difference in the global and action sheet in qtp?
I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .
When ‘option explicit’ keyword is used in qtp?
I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?
Explain the types of properties that quick test learns while recording?
what kind of frame work you used in your last project?
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
What are the different recording modes and how do they work?
What are the advantages of Object Repository?
can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.
what is vmodel?advantages and disadvantages of vmodel?
How to break the object spy ?
i need qtp tutorial. pls send it to sridhar.k151@g mail.com
What are the different kinds of test steps?
How to use conditional loops in qtp ?