How to create log file in qtp?
Answers were Sorted based on User's Feedback
Answer / naveen
Using CreateTextFile method of File System Object property.
we can create a log file and write the data into it.
Sub CreateAfile
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("c:\testfile.txt", True)
MyFile.WriteLine("This is a test.")
MyFile.Close
End Sub
| Is This Answer Correct ? | 7 Yes | 4 No |
Answer / keerthykannan
Dim fso,objLogFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set objLogFile = fso.OpenTextFile ("C:\Log" &var
&".txt",2,true)
objLogFile.Writeline(time)
objLogFile.Close
| Is This Answer Correct ? | 2 Yes | 1 No |
Is there a function to find the number of occurrences of sub strings within a string?
How to compare source and target database in testing? Can anybody please tell me in detail the procedure how to compare it?
How can we use regular expressions for a table in web page, each cell in table having unique identification, Now I want to count number of rows in table and enter data in all cells of the table?
Why do we use breakpoints in QTP?
How do we handle run-time errors?
what r the main attributes of test automation?
what is framework in QTP? any one give me answer
1>How to get the browser name by writing the VBScript. 2>How did you used the GetROProperty and GetTOproperty .give real time scenario. 2>Give and real time ex for the bug having "High Severity and low priority"on banking doamin web based application.
What is iteration? How it is related to Test Results in QTP
3 Answers Virinchi Technologies,
Why we have to import data from excel sheet to data table?becoz v can directly use test data directly from xl know. can u all pls explain me clearly
How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?
How can you connect the database with QTP?