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 |
Hoe to generate all numbers in between to numbers suppose all numbers in between 1 to 100 using vbscript give me code
What is the new version of qtp which is recently released in the market?
can any body tell me how i create a simple script and apply output value on it .pls send me a step by step process
Explain how Selenium is different from UFT?
How do you delete unwanted results in qtp?
how to create the varibles and how these are connect to qtp? plz tell me
What is post recovery scenario?
How can we export test results to an excel sheet in QTP??? Can any one provide sample coding for this?????
can anyone tell me how to search a word/line in a document and to paste it in another file? Thanks in advance.
1)what is the Exact Meaning of Environment Variables? 2)what is Compile Module in QTP? what exactly it contains Functions or Actions?
action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans
CAn anybody tell me how can I use QTP to capture any video in my application?I want to see the video file opened in my application after the tests are completed in tests results.Can anybody help me?