please clarify the question .................
i know how to open the notepad file ?
but i don't know how to enter the data into opened notepad ?

Ex: set a=createobject("wscript.shell")
a.run "Notepad.exe"

please give the replay.
my mail id is raju.ippali@gmial.com, 9823257761

Answers were Sorted based on User's Feedback



please clarify the question ................. i know how to open the notepad file ? but i don'..

Answer / xxx

the above answer is not correct

Is This Answer Correct ?    2 Yes 0 No

please clarify the question ................. i know how to open the notepad file ? but i don'..

Answer / sri satya

Dim a,b
Set a= CreateObject("Scripting.FileSystemObject")
Set b= a.CreateTextFile("c:\Test.txt")
b.Writeline("Hi Welcome To QTP")

Is This Answer Correct ?    2 Yes 0 No

please clarify the question ................. i know how to open the notepad file ? but i don'..

Answer / vibhav srivastav

I thik This Code will Work

set a=createobject("wscript.shell")
a.run "Notepad.exe"
Set Obj = Window("regexpwndtitle:= Notepad").WinEditor
("nativeclass:= Edit")
Obj.Click
a.Sendkeys "I Love QTP"

Is This Answer Correct ?    1 Yes 0 No

please clarify the question ................. i know how to open the notepad file ? but i don'..

Answer / kamal

set fso=createobject("scripting.filesystmeobject")
set fptr=opentextfile("c:\sample.txt",2,true)
fptr.writeline("this is sample program")
set fptr=nothing


in this 2 for write mode and true for if file doesn't
exist, it can create a new file sample.txt, if we give
false, it can open the file sample.txt which is already
exists.

Is This Answer Correct ?    1 Yes 1 No

please clarify the question ................. i know how to open the notepad file ? but i don'..

Answer / m.s.patil

Dim fso,filepath
Set fso =CreateObject("Scripting.FileSystemObject")
Set filePath =fso.CreateTextFile("C:\mpatil3.txt")
filePath.WriteLine ("This is sample code")
filepath.Close
Set fso =Nothing

I have tested this and it works fine.

Is This Answer Correct ?    1 Yes 1 No

please clarify the question ................. i know how to open the notepad file ? but i don'..

Answer / arun

sline="Hello"
Set fso = CreateObject("Scripting.FileSystemObject")
Set CreateFile = fso.CreateTextFile("c:\x1.txt",True)
CreateFile.close
Set OpenFile = fso.OpenTextFile("c:\x1.txt",8,True)
OpenFile.Writeline sline
OpenFile.Close

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

what are the limitations of smart identification in qtp 9.0

0 Answers  


How to add verification steps to tests?

1 Answers  


What is the parameterization?

0 Answers  


How do you done Data-Driven Testing using MS-Word. What is the script for that

3 Answers   IBM,


I have one bitmap image in my webpage. The bit map image is moving like 1 place to 2nd place and 2nd place to 3rd place Etc… in my webpage. I wanted to write script for dynamical objects like above example. Could you please send me the answer for above query.

9 Answers   IBM,


What is User defined function in QTP

6 Answers   Bank Of America,


explian about the qtp frame work? where u can use it in your project?

1 Answers  


What is the "Release Notes", what it cosists? Key components in Release Notes ?

2 Answers  


what is selective recording ? and normal recording?

1 Answers   iSoft,


If a script has a local repository and also uses a shared repository, which repository will QTP use first when searching for an object during playback?

3 Answers  


what is the frame work your using in automation testing

2 Answers  


how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP"

5 Answers   IBM,


Categories