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 |
Hi All I'm new in QTP. I'm trying to make test cases for login on Flight.exe . I have parametrise the agentname and password field. So wen wromg agent name or password is entered it show a dialog box with proper message(Like: "Wrong Password" or :Please enter Password" etc) and OK button. I have created If else block. Now my problem is i want to make checkpoint on error message Dialog box. But each time i create a checkpoint it shows same text message. So how i can check that message is there or not.
In Keyword driven frame work you have write 30 test case for one scenario,in which 10 test cases are failed while executing.client asked you to execute only the failed test cases. HOw can you execute only failed test cases
Can you import and export data from XLS and how?
www.icici.com after this home page wll came, in this page what r the items we r going to test for manual and what the element we r test for QTP... explian clearly with example
If an application name is changes frequently i.e while recording it has name "Window1" and then while running its "Windows2" in this case how does QTP handles?
Is it possible to check the Run time value property of a field through a Database Checkpoint ? Further, is it possible to localize and mention a particular cell , in the database dynamically. My requirement is that I would need to check the status of a particular field , that would change from an "Active" state to a "Stopped" state dynamically.
We have opened three browser such as Facebook,Gmail,Amazon,I want to generate the script of Login of Amazon application, but while adding the object such as edit box(user id,password) in OR is not added.Could you please resolve my issue
Expalin Text/Text Area Checkpoint
Hi All, How to get repeated word in string . Thanks Balaji
How to Parameterize Object repository in QTP?
write script for "dropdown button having how many words? for ex.SELECT CITY is dropdown name.. find out how many cities in that?
What is wrong in my code?