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

How to add synchronisation points in qtp?

739


How do I lauch my test website using code from qtp in different environmet, uat and PPTE?

1689


What is ‘object spy’ and what is the function of object spy in qtp?

742


Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly

1462


How many tabs are available to view your test in a test pane and what are they?

788






What is recovery scenario manager? When you go for recovery scenario manager? Tell me one scenario were your used recovery scenario in your project?

768


How to break the object spy ?

845


Hi, I am supposed to automate mainframe application through qtp. I do not know how to start abt it. Can you plz help me in first initializing the process or do you anybody have a guide book or a link which guides me through the process of automating the mainframe applications and things involved in it.

6835


How many types of Automation frameworks are there in UFT? Describe them.

739


How to get popup error message.

1211


How you can replace string in qtp?

758


I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

1909


Explain how Does Run time data (Parameterization) is handled in QTP?

740


what testplan contents and what test strategy contents,what is the diff b/w them

1839


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

1698