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
how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?
How to creating an output value using quicktest professional (qtp)?
How to associate shared object repository to test in qtp?
RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?
Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.
Have you done batch testing in qtp? If yes how you are doing?
Which scripting language used by quicktest professional?
What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this
How to find a window is minimized or not
Key word driven framework
Differentiate the type of test cases which can be automated and which cannot be automated?
can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?
Mention the test steps of qtp.
In qtp, how you can exit for loop?
For which type of projects the iterative model is not suitable?