Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John

2563


Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?

1868


How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?

3513


Should have experience in framework means?

1856


Does Low-level recording capture mouse movements?

1010


Where is the Bitmap checkpoint information stored?

2269


Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

1123


1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?

1924


Explain in brief about the qtp automation object model (aom).

967


Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19

1587


I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?

2032


What kind of performance is expected on the client side (e.g., how fast should pages appear, how fast should animations, applets, etc. load and run)?

1024


What are the differences between quicktest professional and winrunner?

966


wht is Manual Testing Frame work. Pls anybody can give appropriate answers

2051


When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti

2879