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
can i compare two databases using QTP ?
How to find array size in qtp?
Explain the concept of how quicktest professional identifies object?
Is QTP supports Unix. If yes, then how the test automation is done?
Thanks....But can u tell me how i use the QTP for GIS with one Example...
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?
What is an expert view and keyword view?
Whether qtp 9.0 supports Test director8.0
when u script reveiwing in which area u more concentrates?
I have created 3 actions in test action1, action2, action3 but I want run action 1,action 3,action2 how can you change in the actions in keyword view?
Hi Friends, Would be great if you can provide the Model Question paper, Web site link or any reference s. Thanks & Regards, Byzoor,
Is it possible to change the property value at runtime? How it is possible?
What are the views available in qtp?
There is an excel file of 1 to 100 sheets how you will iterate through it?