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

How to retrieve the property of an object?

1 Answers  


Please let know the scripts for counting number of repeated letters in the word. Note repeated letter should not be count agian. Ex: If "Hello" is my word... l is coming twice.. it should count once and print... secong 'l' should not count again..

5 Answers  


What are the different types of recording modes in qtp? Which will be used when?

0 Answers  


how do find current links in webpage for ex: in yahoowebsite today mainpage is having 50 links and next day same page is having 60 links. if i run same programe it should display total links in webpage ?

4 Answers   CTS,


What is object & properties (in QTP)

5 Answers   Ordain Solutions,






how to main tain the Old scripts in qtp?

1 Answers   IBM,


How to handle Dynamic Arrays?

0 Answers   Wipro,


what do you call the window testdirector-testlab?

1 Answers  


How u send bugs to dev'lpment team all at once or one by one or waht is the process?

2 Answers   kenexa,


What is the descriptive programming?

0 Answers  


What are the Features & Benefits of Quick Test Pro ?

1 Answers   Crea,


QTP is used better in which type of application Web based application or desktop application

3 Answers  


Categories