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


Please Help Members By Posting Answers For Below Questions

what is the latest version of QTP? Main difference between 9.2 and 10 version

1641


What is a programmatic description?

687


Explain quicktest professional testing process?

636


What is the use of running the scripts in Hidden-mode in UFT?

791


How does qtp identify objects in the application?

674






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

2246


breef description of batch testing ?

1789


What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?

726


What is the synchronization point in qtp?

651


In an interview, what r the general questions asked in SQL which is realted to testing ?pls give me anwser to this question?

1543


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?

745


what is meant by source control?

1795


How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.

1537


How to remove associated function library?

649


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?

1680