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...

How can we parameterize our test, values in flat file.
Ex:- Values in notepad, with that values i want to
parameterize the test.

Answer Posted / arunsingh

'Open a notepad and enter some values in
'line by line and save it (C:/a.txt)
'FlightReservation window should be opened

set obj=createobject("scripting.filesystemObject")
set file=obj.opentextfile("C:/a.txt")
i=1
While file.atendofline<>true
n=file.readline
datatable.setcurrentrow(i)
datatable(1,1)=n
i=i+1

'Record some transactions by opening a ordermenu and
'enter order number

Window("Flight Reservation").WinMenu
("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open
Order").WinCheckBox("Order No.").Set "ON"

'replace order number which u entered
'at the recording with n

Window("Flight Reservation").Dialog("Open Order").WinEdit
("Edit").Set n
Window("Flight Reservation").Dialog("Open Order").WinButton
("OK").Click
if(Window("Flight Reservation").Dialog("Open Order").Dialog
("Flight Reservations").exist)then
Reporter.ReportEvent
micFail, "OrderNo "&n, "Not Exist"
Window("Flight Reservation").Dialog("Open
Order").Dialog("Flight Reservations").WinButton("OK").Click
Window("Flight Reservation").Dialog("Open Order").WinButton
("Cancel").Click
datatable(2,1)="not Exist"
else
Reporter.ReportEvent
micPass, "OrderNo "&n, "Exist"
datatable(2,1)="Exist"
end if
Wend


Try for this u will get it.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

2068


hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?

3697


What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?

1146


What is checkpoint in qtp?

983


How to creating an output value using quicktest professional (qtp)?

977


How to use transactions in qtp?

941


How can you give wait up to 10 seconds in qtp?

974


Explain types of descriptive programming?

998


what is profile tool?

2155


For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?

979


how can i call function (which has link with excell sheet at a remote location) within another function

1988


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format, if possible, kinldy mail PDF file to my mail-ID: ramakrishna908@gmail.com Regards, krishna.

1975


Explain Descriptive Programming Types with Examples?

1448


What do you mean by iteration?

1150


QTP script is not working on other's machine..

1935