I want to open a Notepad window without recording a

test and I do not want to use SystemUtil.Run command as

well How do I do this?

Answers were Sorted based on User's Feedback



I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / sathishkumar

You can open the notepad by using the below code:

Invokeapplication "notepad.exe"

Is This Answer Correct ?    6 Yes 1 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / ravi

Dim s
Set s= create object("wscript.shell")
s.run"notepad"
set s= nothing

Is This Answer Correct ?    4 Yes 0 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / mukesh

hi,

u can open a Notepad by using record and run setting for
windows application ( there u can give the path of
notepad.exe) and also by invokeapplication method
there u have to give the physical path of notepad
for ex (c://programfiles/.....)

Is This Answer Correct ?    1 Yes 0 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / poo

invokeapplication("notepad")

Is This Answer Correct ?    1 Yes 0 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / gopikrishna

hi,

Sreeprasad saying is perfect.

Is This Answer Correct ?    0 Yes 0 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / chaitu

You can open the Notepad through this method also

Set Notepad = CrateObject("Notepad.Application")
Notepad.visible = Ture

Set Notepad = Nothing

Is This Answer Correct ?    1 Yes 1 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / ravindra

Setfso = CrateObject("scripting.filesystem object")
setf=fso.opentextfile("path of that notepad file",mode of
file,value)
while (f.end of line)<>true
x=f.readline
some statements
f.close

Is This Answer Correct ?    0 Yes 0 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / tvs ramakrishna chowdary

what ever Ravi said that is obsolutly 100% correct..

Is This Answer Correct ?    0 Yes 0 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / indra

Set fso = CreateObject("Scripting.FileSystemObject")
fso.OpenTextFile("c:\testfile.txt", ForWriting, True)

Is This Answer Correct ?    0 Yes 0 No

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run ..

Answer / ram.polavarapu

dim ws
set ws=createobject("wscript.shell")
ws.run"notepad.exe"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Suppose there are 10 browsers opened on desktop. I want to close all browsers except one browser in QTP. Can any one give the code for this?

7 Answers   IBM,


Which statement will use for close an action in QTP?

0 Answers  


why can't you use excel directly in qtp. why we want to import excel data into Datatable.

1 Answers   BoA,


Is it mandatory to know abt regular expression in descriptive programming

2 Answers  


what is object spy

5 Answers   TCS,






How can I replace all the text from the QTP script with some other text. Is there any replace all function in QTP Any one can help me

5 Answers   Livetek, Virtusa,


Can we use Virtual Objects in Discriptive Programming?

5 Answers   Keane India Ltd,


How to change the run-time value of a property for an object?

3 Answers   Crea,


What is the difference between driver-script and AOM-script?

2 Answers   IBM, Value Labs,


What is the difference between Systemutil.run and Navigate.

6 Answers   Synechron,


How many types of Parameters are available in QTP?

1 Answers  


Hi, one script having 10 Actions,but i want to execute only 3rd action and 7th action? how to execute selected actions? throgh script and through navigation?

2 Answers   IBM,


Categories