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
Explain different type of event trigger option.
Differentiate the type of test cases which can be automated and which cannot be automated?
i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?
what is error and fault in terms of software quality?
what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”
What is quick test pro?
Can you brief the hurdles you faced during Automation testing?
How to check bitmap output value?
I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?
How can i initiate the objects to find uniquely in OR
How will you check a web application for broken links using qtp?
How often were they executed?
How do know the number of browsers opened?
How to get popup error message.
Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work