How can we parameterize our test, values in flat file.
Ex:- Values in notepad, with that values i want to
parameterize the test.
Answers were Sorted based on User's Feedback
Answer / ratankumar
Hi Dear friends!
As per my knowledge iam giving the script to do datadriven
by flatfile in qtp.
First creat a notepad with some inputs in d system
thenOption explicit
Dim fso,f,x
set fso=createobject ("scripting.filesystemobject")
set f=fso.opentextfile("Path of the notepad")
While f.atendofline <>true
x=f.readline
Window("Flight Reservation").WinMenu("Menu").Select
"File;Open Order..."
Window("Flight Reservation").Dialog("Open
Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open
Order").WinEdit("Edit").Set x
Window("Flight Reservation").Dialog("Open
Order").WinButton("OK").Click
Window("Flight Reservation").WinButton("Delete Order").Check
CheckPoint("Delete Order")
Wend
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / srinivas prasad
dear friends for qtp documents visit www dot gcreddy dot
com, there you can find more information abot
parameterization
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / 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 |
in my database haveing 3X3 (manas having 3 rows 3 colums) i want to test only (2nd row 3colum) bit how to test either script or any automation plz explain? (Chandana)
how to do the batch testing in test director using manual testing procedure?
what is descriptive programming in QTP? How can be done?
How software automation specialist enter steps in the Expert View?
write script for "dropdown button having how many words? for ex.SELECT CITY is dropdown name.. find out how many cities in that?
1.what is the difference between childobjects and child items in qtp? 2.what is difference between a class and function? 3.can u convert ustimings to indian timings using vbscript? 4.i have scripts in one machine.can i run those scripts in another machine.how?
2 Answers Genpact, Infosys, Symantic Space, TCS,
How you r using QTP in u r project
1 Answers IBM, Lehman Brothers,
What is the method for maximize the application while we using Decriptive programming in QTP?
In QTP, while launching qtp application from startup.. we find Advanced Keyword-Driven Testing caption.. wht is that...Anybody can pls explain it. Thanks in Advance
Please guide me release notes of Automation once scripts are completed
WHICH PROCESS U FOLLOW IN COMPANY
hi what is the use of "dim" in automation objective model or any where what is the use of "dim" plz tell me