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 capture objects of remote deskop as it is capturing only window.
what function you write to do database testing with the help of qtp?
In a page i have N number of links at a time i would like to open those links by using QTP?how to do that?
Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly
Difference between copy to action and call to action?
Hi friends I am new in Qtp. now i am Searching on Qtp give real time inter questions with answers.pls help me
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
We need to verify the user name & password in for the user validation. But we don't want to use the parameterization/ loop for user name and password. What is the way in scripting so that user & password will generate automatically.
how did u use automating testing tools in ur job?
can we change the name of a check point? when will you start writing testcases? do you follow any methodology for writing test scripts? qtp is key word driven testing or data driven testing?
Can any one please list me out the shortcut keys for some functionalities in the QTP .. for example ..to record...to run...etc
c language is thre but what is the purpose of c++, java is there but what is the purpose of Advanced java ....why these are all versions are coming...whta is the problem?