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 latest version of QTP? Main difference between 9.2 and 10 version
What is a programmatic description?
Explain quicktest professional testing process?
What is the use of running the scripts in Hidden-mode in UFT?
How does qtp identify objects in the application?
Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John
breef description of batch testing ?
What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?
What is the synchronization point in qtp?
In an interview, what r the general questions asked in SQL which is realted to testing ?pls give me anwser to this question?
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
what is meant by source control?
How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.
How to remove associated function library?
hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?