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


Please Help Members By Posting Answers For Below Questions

I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”

572


Can we record an application running on a remote machine using qtp?

708


Hi All, I need code for how to execute qtp scripts from excell sheet

1453


What are the types of object repository?

571


How to create runtime property for an object?

1440






Differences between quicktest professional (qtp) and winrunner?

616


How to check feasibility of the appliction?in automation testing?

1465


is there any addin for remedy user application

1737


Explain the types of properties that quick test learns while recording?

552


What is the Difference between test object and run time object?

599


What are the advantages of a Hybrid framework?

590


Can U Explain about QTP tool from older version to latest version also its differences?

1505


What is the difference between local and shared object repository in qtp?

547


Hi, I am supposed to automate mainframe application through qtp. I do not know how to start abt it. Can you plz help me in first initializing the process or do you anybody have a guide book or a link which guides me through the process of automating the mainframe applications and things involved in it.

6648


Explain different checkpoints in qtp.

713