How can we use the "CreateObject("Wscript.Shell")" in QTP
and what is the definition and purpose of it?
Answers were Sorted based on User's Feedback
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 |
Answer / hemakumar.m
For perfoming keyboard operations "Wscript" is use full.
Eg:For Pressing "F5"
Set Object=CreateObject("Wscript.Shell")
Object.SendKeys "{F5}"
U can find this in qtp help.
Is This Answer Correct ? | 10 Yes | 4 No |
what type of test cases tou will automate?
How do you start automating/ writing your QTP scripts ?
what is difference betweein qtp 9.0 and 9.2
what we do after completion of functional and regression testing
what is bultin funtaion in QTP &tell me five examples?
Hi Friends, Can any one answer this question? 17) What method is used to retrieve the number of columns in the query results? A. Fields.Count B. Fields.Item(EOF) C. Fields.Count(BOF) D. Fields.Count.Value
why text area checkpoints cannot used for web applications
I know the Basic QTP. But I wanted to learn descriptive programming in QTP. Without Object Repository how we can develop a script? I wanted to do one real time project using QTP. If you know this type of training is available in pune then let me know the address.
What is the difference between Call to Action and Copy Action.?
Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5
I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?
what is difference between calling a function and reusing an action?