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



What is the logic for reading(exporting)the data from flat files to QTP?Can anyone explain me wit..

Answer / 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

More QTP Interview Questions

what QTP Options do you know?

0 Answers  


What are the automation metrice in your project?

0 Answers   Accenture,


What is the difference between Call to Action and Copy Action.?

2 Answers  


hi testers,one script has three actions , at the of running three actions are running , how to set run only perticular action and what is the use of split the action? when it will be useful?

3 Answers   Syntel,


what is the difference between QTP 8.0 & 9.0?

4 Answers  






Give me the Example of standard check point and text check point with syntax?

3 Answers   IMI Soft, IMI Soft Engineering,


Give the syntax to import/export xls into qtp.

0 Answers  


Hi guys pls any one send me the Qtp Licensed key of version 10.0 pls

0 Answers  


several browsers opened. write QTP script to close all browsers except gmail.

1 Answers   Thomson Reuters,


how to count spaces in a given string ex: "this is jagadeesh" in QTP with simple functional script

5 Answers   Cap Gemini,


• What type of testing questions will be asked for 2+ yrs exp people in interview?

0 Answers  


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?

0 Answers  


Categories