how to read log file using QTP??

Answer Posted / raju

Log files is nothing but *.txt & *.xls files

How to read log file *.txt:
1). for ex file name is raju.txt.

set a=createobject("scripting.filesystemobject")
set b=a.opentextfile("File path",1) (1 for Reading,2 for
Writing,8 for Appending)
while b.atendofline <>true
c=b.readline
msgbox c
wend

2). for ex file name is raju.xls
datatable.importsheet "file path", Sourcesheet, destination
sheet.
msgbox datatable(column no, sheet name)


i think this is working properly
if u have any quarries please call me
9823257761, my mail id is raju.ippali@gmail.com

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a script for allinterview-submit Question first we've to select Choose Category,second select Sub- Category(Which is comes in to runtime)third select Question Type.for that give some descriptive and vb script

1365


Give the syntax to import/export xls into qtp.

588


What is the difference between run time object and test object in QTP?

569


What is post recovery scenario?

1653


Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?

1486






Explain the parameter in qtp?

583


What is qtpro?

597


what type of automation is follwed in the project?

1489


i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?

1507


Explain hybrid framework with advantages and disadvantages?

546


hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....

2441


Is virtual object supported in low level recording mode?

626


Explain the types of properties that quick test learns while recording?

563


Explain the qtp test phases.

619


How does quicktest professional (qtp) identifies the object in the application?

583