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 qtp recognizes the object?
Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B
Is any limitation to xml checkpoints?
Does any one worked on JIL Emulator , Testing with QTP(automation). Trail Version of QTP is not identifying the child objects of JIL emulator, Can any one help me out ,
What is the default object synchronization timeout in qtp?
hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this
What is accessibility check point?
What are private functions in QTP? How they can be called from the function library?
Does quicktest professional is unicode compatible?
How many add-ins comes by default with qtp?
What is expert view in qtp?
What is qtpro? What is quick test pro? What is a quick test professional?
Explain the concept of object repository and how quicktest professional recognises objects?
What are the recording modes in qtp?
How you are developing the script? Using record and play back or manual?