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 |
It is given in the help of QTP 9.2 that we cant debug the scripts. Is there any other way to VIEW, PAUSE and make modifications in the scripts during execution???
anybody wants to learn QTP with realtime implementations and complete framwork contact to this mail id ciraaj@gmail.com
1) after inserting the check point how to change the expected value that was captured while inserting the check point
1.How to find in which row or column,string "Hyderabad" exist in excel sheet? 2.How to find how many times character "a" repeated in a given string "Koteswararao"
How will you handle the situation when object is not captured during record?
On a web application I want to select list item 5 from a dropdown list. but QTP identifying this object as winobject. Then how can we select list item 5 from that dropdown list.
By default Action1 runs first in QTP. Is it possible to start the run with Action2?
how to fetch the values from grid? & qtp recogniges that grid as a webelement? what u do?
Hi cud you plz answer my question.. what is the size of Object Repository?
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
How can i test an application like Google Earth.In my application data will be fetched from a oracle database based upon which graphs are generated..so these all are dynamic..how can i use qtp here..alongwith that how can i test the map generated by a satellite just like google earth..
What is the keyword view and expert view in qtp?