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 / pradeep
DataTable.importSheet"C:\Test.xls"
DataTable.getsheet"Practice"
rowCount=DataTable.getSheet"Practice".Getrowcount
set xls=CreatObject("Excel.application")
set Xbook=xls.Wbook.open("C:\Test.xls")
set Sheet=Xbook.OpenSheet("Practice")
For i=0 to rowCount
'Assigen the values to local variables.
Num1=Trim(cint(DataTable("Input1")))
Num2=Trim(Cint(DataTabel(Input2")))
expNumber=Trim(Cint(DataTable("expResult")
set these values into corresponding edit boxes
and click the button ok
Retrive value form the result box by it property value
called text using GetROProperty method.
Comparison done by following and store into variable called
actualResult
if(expNumber==actualResult)
sheet.cell(i,3)="Pass"
Else
Sheet.cell(i,3)="Failed"
Next
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is Cross browser testing? Does UFT support it?
any body can you help me what is the script to automate an comand promt
Explain building blocks of the bpt framework ?
What is recovery scenario manager? When you go for recovery scenario manager? Tell me one scenario were your used recovery scenario in your project?
What are the different recording modes and how do they work?
What Folder Structure following in Keyword Driven Frame work?
Can we run multiple QTP scripts one after the other without manual intervention? How?
how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief
What are the recording modes in wave event?
Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project
Create flight reservation login descriptive programing (Condition: Remove the value and substitute with a variable, and then call the validation from Excel) Plz help me....... very urgent.........
distinguish between old version and new version QTP features.
What are the types of properties that quick test learns while recording?
What are the differences between quicktest professional (qtp) and winrunner?
Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris