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
distinguish between old version and new version QTP features.
can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?
desribe a situation where u faced a stressful situation and how did u cope with it
I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error
If there is a change in the object type eg: A button is changed as link, 1. How to edit that in the shared object repository. 2.What options are available to edit the object within shared object repository other than copy from loca; 3.What would be the effect of the change in Coded Scripts within QTP and Functions stored in .vbs file which are loaded and used in QTP
How do we handle run-time errors?
What is the quicktest professional testing process?
How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?
terminal services client
Explain how Does Run time data (Parameterization) is handled in QTP?
How you can find the absolute value of the number in qtp?
How does qtp recognize objects in aut?
Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?
If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?
What environment does qtp run in?