how to read log file using QTP??
Answers were Sorted based on User's Feedback
Answer / jayant naikwade
Note:- Bu Using Import as well as export Method
Give path for .xls file on Root Directory in datatable
parameter as below.
p_strFile=jayant.xls
p_strFile1=jayant1.xls
strFile=DataTable("p_strFile",dtGlobalsheet)
strFile1=DataTable("p_strFile1",dtGlobalsheet)
DataTable.ImportSheet
strFile ,1 ,"acn_Dummy"
DataTable.ExportSheet strFile1 ,3
iTotalRows = DataTable.GetSheet
("acn_Dummy").GetRowCount
For i = 1 to iTotalRows
DataTable.GetSheet
("acn_Dummy").SetCurrentRow(i)
strMenuNm = trim(DataTable.GetSheet
("acn_Dummy").GetParameter("No").Value)
strAction = trim(DataTable.GetSheet
("acn_Dummy").GetParameter("name").Value)
Next
Is This Answer Correct ? | 4 Yes | 0 No |
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 |
Normaly log files are of .txt format.
so to read .txt files try using FSO (file system object)
Is This Answer Correct ? | 0 Yes | 0 No |
how to insert QTP to display errors and other description in the test results instead of halting execution by throwing error in the mid of executin due to an error (for object not found)?
how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps
what is the data driven testing?
Explain about the Test Fusion Report of QTP?
How to modify object property in qtp ?
How to findout the number of spaces with in STRING For Ex : STRING is " RAJ IS A SOFTWARE ENGINEER " Please send me the answer
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
how to idetfy which test cases are automated?who will deside that plz tell me
action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans
What are the challenges you faced during you entire life automation ?
I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2
Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional" O/P "Professional Test Quick"