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
Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji
Is it possible to use two instances of UFT on the same machine? If not why?
what is the advantages and disadvantages of using functions instead of re usable actions
Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please
Is it possible to change the values of analog recording?
Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach
assume i have few url link how will i dynamically call then using descriptive programming?
what is stepin & stepout?
Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work
Explain how to use QTP to check broken links on a page?
What are the different types of recovery operation?
What does it mean when a check point is in red color? What do you do?
how to convert 100 into hundred repees only and viceversa
Can any body please tell me the steps of keyword driven framework of QTP.
Please guide me release notes of Automation once scripts are completed