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
How to carry out bit map check points in QTP
How does you test a weblink which is changing dynamically?
How you create new action in qtp?
how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel
one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.
hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)
I am trying to install QTP 9.5 but i am getting error message saying that ("Path is \QuickTest Professional\bin\vb_init.exe") vb_init.exe file is not find. can anybody give me the advise what to do ?
Which functionalities of QTP used in banking project? pls any say answer?
Explain measuring transaction.
how to evalute defects in QTP script?
What is the basic concept of quicktest professional?
How to write business scripts using object repository with different scenarios
in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?
What is the short cut keys for the following?
Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?