ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
How can we parameterize our test, values in flat file.
Ex:- Values in notepad, with that values i want to 
parameterize the test.
 Question Submitted By :: Srikanth
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How can we parameterize our test, values in flat file. Ex:- Values in notepad, with that values i want to parameterize the test.
Answer
# 1
'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
Arunsingh
 
  Re: How can we parameterize our test, values in flat file. Ex:- Values in notepad, with that values i want to parameterize the test.
Answer
# 2
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 ?    1 Yes 0 No
Ratankumar
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
hi all QTP recognizing objects as "string_1","string_2","string_3","string_4" like that but when using FOR LOOP for these.QTP not proceeding further can i declare these _1,_2,_3,_4 as a single variable Livetek3
How you r using QTP in u r project Lehman-Brothers1
write progamming connecting QTP to database sql? this is question asked by interview? pls any answer this? IBM2
from where we will retrieve data for data driven tests in qtp?  3
what is functions in qtp?i know the userdefind &bulit funation or i know that Private public function ?plz tell me what is funations in qtp?how to create a funation in qtp NIIT3
Hi All As per the requirements i have to copy the data from word document to excel sheet using the QTP Note : Data in word document is in tabular format i.e there is 80 rows and 5 columns table Can any body provide code for this ? Thanks in advance Regards Test123Test  1
is the institute MindQ laid by Mr.Nageswar rao.. heard alot about Nageswar rao...can you briefly let me know about the Nageswar rao inst. and MinQ...THANX IN ADVANCE  15
Hi All I am installing QTP 8.0/8.2 in my office desktop (WIN XP) but it is not working. Inspite Installion is succesfully done but when i open qtp from programs it opens only first screen of add-in and after that it disappears. But in my other computer at home (winxp) it is working fine. Can you please give the reason, why it is not working in office desktop. DEEPAK SINGH Satyam4
what is the exact testing process in qtp plz explin ?  2
what type of scripts are asked in qtp?  2
How to record & run on Japanese language application using english version of QTP ??? ABC4
does test plan is in test strategy or test strategy is in test plan Tanla-Solutions2
how to write script in qtp(vbscript)..i mean with out application deployed..and how to call script1 into script2? Infosys5
How u perform Batch Program in QTP?  1
How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it? Livetek3
DEFECT LIFE CYCLE,WHO PUT THE STATUS AS OPEN IGT4
Associated files in QTP?  1
How to test whether the navigation i.e. from one page to another is working r not using QTP for web based application  1
what is frame work of qtp? ITC-Infotech3
CAN SOME ONE TELL ME ABOUT QTP FRAMEWORK? I AM SUPPOSED TO GIVE THE QTP FRAMEWORK THIS WEEK SO PLEASE HELP  2
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com