Explain about opening notepad in QTP and writing of test
result in notepad?
Answers were Sorted based on User's Feedback
Answer / sailaja
Hi
The above ans will error message at for loop.
This will work fine.
Dim fso,notepad
set fso = createobject("scripting.filesystemobject")
file_path = "c:\nandu.txt"
'forwriting =2
'forreading = 1
set notepad = fso.createtextfile(file_path,1)
notepad.writeline "this is created by Nanda"
notepad.writeline"this is created on "
set notepad = fso.opentextfile(file_path,1)
Do
n = notepad.readline
msgbox n
Loop until ( notepad.atendofstream=true)
Thank you
Sailaja
Is This Answer Correct ? | 14 Yes | 2 No |
Answer / shyam.meghansh
systemutil.Run("C:\WINDOWS\NOTEPAD.exe")
Window("Notepad").WinEditor("Edit").Type "Hi This is shyam "
Window("Notepad").WinEditor("Edit").Type micCtrlDwn + "s" +
micCtrlUp
Window("Notepad").Dialog("Save As").WinEdit("File
name:").Set "demo"
Window("Notepad").Dialog("Save As").WinButton("Save").Click
'..........Any more question mail me
testingwithshyam@gmail.com
Is This Answer Correct ? | 10 Yes | 1 No |
Answer / ajreddy
set fso = createobject("scripting.filesytemobject")
file_path = "c:\ajreddy.txt"
set notepad = fso.createtextfile(file_path,forwriting)
notepad.writeline "hi ajreddy"
notepad.writeline "this is created on "& now
notepad.close
set notepad = fso.opentextfile(file_path,forreading)
for notepad.atendofstream
n = notepad.readline
msgbox n
Next
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / narendrababu
In qtp directly we con't open notepad.so,create an object
first(fso),through this obj we can access notepad.
to create an obj
set fso =create object(scripting.filesystem object)
set x= fso.opentextfile()
Is This Answer Correct ? | 3 Yes | 5 No |
where did you automate in your project?(please tell me example senarios)
If you have given 1000 manual test scripts, what test you will do? and how?
How to supress warnings from the "Test results page"?
How to compare the two strings?
I want to run my qtp scipt on the system where qtp is not installed .I don't want to install qtp but i want that system should use the qtp from another system in lan just the qtp instance should be launched on that system without having qtp installed on it .I probably know the solution that it will be solved through RMI but how to get this problem solved plz help i anyone know the answer
How you know that a test case is a regression test case
Pls can anyone give me the entire code for the Keyword driven framework with respect to he Flight Reservation Window in detail with explanation. Pls explain in detail stepwise. Thanks a lot. Pls very urgent?.
we have 10 more actions in our test and we are using exit action command to come out from the action if any error s occured.In action 1 if any error occurs control is moving to second action but if we get error in second action exitaction is throwing general run error. Please give a idea to overcome .
IF THE GUI OF APPLICATION IS CHANGED THEN IS THERE ANY NECISSITY TO CHANGE OR UPDATE OUR TEST SCRIPTS
How the automated tests in org
what is framework? which frame work u follow for writting script?
What is the difference between "Call to copy of action", "Call to existing action" & "Call to winrunner action"?