Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



How can we use the "CreateObject("Wscript.Shell")" in QTP and what is the defi..

Answer / 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

How can we use the "CreateObject("Wscript.Shell")" in QTP and what is the defi..

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

Post New Answer

More QTP Interview Questions

Can you give me the code to calculate the total number of Links using the child object in the web page..? is there any other way to calculate number of links with out using the Child objects.??

2 Answers   DST Global Solutions,


what is use of optionexplicit in variable declaration

5 Answers   GE,


How u will open the build automatically in QTP except using Systemutil.run command

6 Answers  


what is descriptive programming?

5 Answers   Ordain Solutions,


What is the pros and cons between QTP and Rational Robot

0 Answers   Virtusa,


How to use library files in QTP? how we can call these files in to script?

4 Answers   Virtusa, Wipro,


Explain the check points in quicktest professional?

0 Answers  


What is descriptive programming?

15 Answers   Wipro,


Where the text version of script file located in file system?

1 Answers  


How do you return a value for an array.

1 Answers  


what is the purpose of SetTOProperty Method?

1 Answers   Cap Gemini, iGate, Wipro,


Hi, how can we retrieve a specific value from Excel Sheet (Not datatable. for externel file).i mean to say from .xls file. and also tell me from xml file and .doc file. and how can u parameterize ur script from .xls file.(Not data table).

2 Answers   Cap Gemini,


Categories