Explain about opening notepad in QTP and writing of test
result in notepad?

Answers were Sorted based on User's Feedback



Explain about opening notepad in QTP and writing of test result in notepad?..

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

Explain about opening notepad in QTP and writing of test result in notepad?..

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

Explain about opening notepad in QTP and writing of test result in notepad?..

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

Explain about opening notepad in QTP and writing of test result in notepad?..

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

Post New Answer

More QTP Interview Questions

What is the basic concept of quicktest professional (qtp)?

0 Answers  


What is the difference between Recover Scenario(screen) and on Error Resume Next(code)

4 Answers  


How to get the column count and column name from the resultset in the database connection program?

6 Answers  


On the website, the protocol has been changed https: to https what you will do? Tell me your approach?

0 Answers  


what is ODC and GDC?

0 Answers   Patni,






why do we go for Test Automation?

2 Answers  


What are SetToProperty, SetRoProperty, GetToProperty scripting?

4 Answers  


Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?

0 Answers   IBM,


Both static and dynamic arrays are handled by the vb script. Is it true?

0 Answers  


I have two actions in my QTP test and two iterations in my DataSheet. I want to execute the Action 1 for the two iterations only after which i want to exceute the next Action2. How is this possible?

4 Answers  


Did you face the problem, changing the properties of an object in Run Time?

1 Answers  


i need qtp tutorial. pls send it to sridhar.k151@g mail.com

0 Answers  


Categories