How can we use the "CreateObject("Wscript.Shell")" in QTP
and what is the definition and purpose of it?
Answer Posted / mahi
If we want to work on operating system related functions
(like command prompt,windows registry....) then we go
for "Wscript.Shell".Actually this is vbScript class. WE can
not directly use this in qtp. For that one we need to
create one instance firstofall. Using CreateObject we can
create instance as followes.
Set oShell=CreateObject("Wscript.Shell")
oSehll.popup "Have a great day"
oShell.Run "cmd /k dir"
oShell.sendkeys "{ENTER}"
set oShell=Nothig
I hope this may useful.
Regard,
mahi.kotike@gmail.com
Is This Answer Correct ? | 29 Yes | 2 No |
Post New Answer View All Answers
What do you mean by iteration?
Define Environment Variable in UFT and its uses?
What are the differences between qtp and winrunner?
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how
Explain the concept of how quicktest professional (qtp) identifies object?
who QTP recognizes the object stored in object repository?
Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.
PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME
How many ways is to parameterize the value?
How to capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)
Can we write winrunner language i.e TSL in QTP tool?
What will be happen if i load object repository at run time, but it has already associated.
Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out
what are the mandatory properties for a tex boxc (scenario?)
I want to test my vb.net solution file using qtp. Does Qtp test only .exe file?