Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out

1976


what is the diffrence bw qtp architectute and qtp framework?

1972


Explain how to use QTP to check broken links on a page?

975


how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps

2063


What is object repository in qtp?

993


How do you compare the structure of 2 tables in database and check whether they are similar using qtp.

1900


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

2047


how to fetch the values from grid? & qtp recogniges that grid as a webelement? what u do?

2385


How we can import data from database?

1177


In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail

2028


How to recognise the webelement and verifying that webelement is enabled?

2145


What is QTP testing process?

1049


What is text check point and text area check point?

1069


In what occasion we can specify global sheet and action sheet?

1001


How you can find the absolute value of the number in qtp?

968