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 types of testing comes under functional testing or in other word what will you test in functional testing?
Is manual Testing replacement of automation testing?Which types of testing we can not do in automation testing but can do in manual testing?
What are objects? how do you select the unknow object?
how to identify an object which is not in the object repository identification can be done using descriptive programming.
how to associate object repository during runtime in qtp
How do u do batch testing in WR & is it possible to do in QTP, if so explain?
Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)
What are the properties you would use for identifying a browser and page when using descriptive programming?
What are the enhancements u did after recording ur script?
What is parameterization? What is syncronization pt.?
3 Answers Semantic Space, SRM,
pls guys understand this is question CAREFULLY,,, interviwer asks can u write test case for ATM m/c..i told, insert card enter pw...like this,,but interviwer not happy with that...ur not going to atm center? in ur office system ur testing ATM M/c...why ..how to test? what is the process?
In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field and so on. how we can handle this scenerio thru Descriptive programming?