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?

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


Please Help Members By Posting Answers For Below Questions

How to find operating system information using the qtp script?

1139


Explain how you can find length of array in qtp?

1103


Explain in brief about the quicktest professional (qtp) automation object model?

1023


Explain quicktest professional testing process?

1068


How to run a test using quicktest professional?

1027


How did you use regular expressions in QTP and also in WR?

2690


What will be happen if i load object repository at run time, but it has already associated.

1845


Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji

2781


Discuss the QTP Environment?

1097


How to handle dynamic objects in quicktest professional?

984


what is actually contain test report? can anybody post the test report

2039


What are the benefits of quick test pro(qtp)?

1031


Is QTP supports Unix. If yes, then how the test automation is done?

2231


What is the difference between Keyword Driven test and Data Driven test?

2281


What is the basic concept of quicktest professional (qtp)?

1115