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

why don’t use real time they r not using check points

1 Answers   Wipro,


What are the different properties of an web object

0 Answers  


How can i count the list box elements in QTP ?using script plz explain me (Chandana)

6 Answers   Wipro,


suppose u hav a dialog or window which contains 10 buttons with same name & value. now how to check each button? i.e. how qtp indetifies these objects separately?

2 Answers  


How to change the screen name while running the test.

3 Answers   TCS,


Any one knows about descriptive programming to identify objects in a page? Kindly drop me mail prasanna.sabat@gmail.com

3 Answers  


What is test fusion report?

2 Answers   CIL,


How many add-ins comes by default with quicktest professional?

0 Answers  


I need diffrences between Object Identification, Smart Identification, Regular expresion,Low-Level Recording (enables you to record on any object in your application, whether or not QuickTest recognizes the specific object or the specific operation.) I am working on Web Application. In that object caption will change dynamically. For example, consider “Save” button. On clicking save button the caption changing as “ EDIT ”. From above concept which concept I have to use here?

2 Answers   Ordain Solutions,


how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel

0 Answers  


Hi, When I click on a hyperlink a secondary pop-window will open. In that pop-up window there will be 'N' number of records arranged in with paging option in datagrid table. Each rows contains two columns, one is text and the other is a radio button. I will pass the first column value and based in it the tool have to select the corresponding radio button in that row. Please someone help me how to handle this as am new to QTP.

2 Answers   CTS,


how and what kind of vb functions do us ein QTP?

2 Answers   Ordain Solutions,


Categories