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 / 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 |
I want to see all the properties of agent name in login window. I will use the script Set a=Window("FR").WinEdit("Agent Name:").Gettoproperties( ) msgbox but my question is how to use the msgbox if i use a it will display only a, so anyone pls let me know how to get the display of all the properties using GetToProperties () or GetRoProperties (). Thanks a lot
How to create Reusable and Multiple Actions?
if we can find the status of script in qtp that either it's pass or fail then why we need to put this status on different excel file or log file in hybrid framework .please let me know asap thanks
1)What is the Difference Between WaitTo & Sync?
Explain more about the Test Fusion Report of QTP?
how to associate object repository during runtime in qtp
suppose i give valid user id and password to open an web base application on qtp.how qtp will know itis a valid user id and password
one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.
Explain the concept of Output values in Quick Test Professional?
can we call a test in another test? how? explain with one example?
Add parameters during time in each row in one column
Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this