What is the logic for reading(exporting)the data from flat
files to QTP?Can anyone explain me with an example?
I appreciate it!!!
Thanks!!!
Prasanna
Answer Posted / jhansi rani
the process is
assume the flat file is "abc.txt" which consists of some
data like sno and sname.
first we need to create object for that txt file like
set fso=createobject("scripting.filesystemobject")
next open that file using that fso
set f=fso.opentextfile("path of the txt file",mode)
1 --- readingmode
2 --- writing mode
8 --- append mode
while f.atendofline <> true
f.readline --- to read the line from the text file
.
.
.
.
.
perform require operations
wend
so total script is as follows
Set fso=createobject("scripting.filesystemobject")
Set f=fso.opentextfile("E:\testingexamples\abc.txt",1)
While f.atendofline <> true
msgbox f.readline
wend
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John
Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?
How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?
Should have experience in framework means?
Does Low-level recording capture mouse movements?
Where is the Bitmap checkpoint information stored?
Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?
1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?
Explain in brief about the qtp automation object model (aom).
Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19
I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?
What kind of performance is expected on the client side (e.g., how fast should pages appear, how fast should animations, applets, etc. load and run)?
What are the differences between quicktest professional and winrunner?
wht is Manual Testing Frame work. Pls anybody can give appropriate answers
When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti