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 |
When you are running a batch test of 5 scripts and in 2nd script appln crashed, what hpns then?
when i perametarization of the test through outputcheckpoint,i have seen run time error i.e outputcheckpoint mismatch .Plz tell anybody to me(qtp).How to clear that?
Does QTP recognize two diff browser's at a time..?if possible how..? Is it possible run scripts on Mozilla which are recorded on IE..?..How..?
12 Answers IBM, Semantic Space, TCS,
what is the difference between modular framework & datadriven framework
How to find duplicates in an array and remove them efficiently?
WHO TAKE DECISION TO RELEASE THE BUILD
Diff b/w test scenario's and test Procedures?
How many types of Parameters are available in QTP?
How you can find length of array in qtp?
What is the Command used to start the QTP
When we try to use test run option "Run from Step", the browser is not launching automatically why?
hi everyone today is the first time i saw this website,and hi iam siraj,iam very impressed by seeing evryones response towards questions,iam a newcomer and i have got tryining in testing can anyone please send me some projects relaited to testing.i know it is very confidential but still if u send it will a great help. my mail id venku_krs@yahoo.co.in