QTP Descriptive Programs Headline Animator

QTP Descriptive Programs

Monday, May 19, 2008

How to Launch QTP Window with appropriate Add-ins?

Prerequisites: Make Sure that all Add-ins in Add-in Manager are de-selected.
Procedure Open notepad and Paste the below Script and save it in appropriate location with .vbs extension (Ex: Test.vbs). Once the script is saved Click on that VBS File (Double Click), it opens QTP Window within time and Loads provided add-ins to script.
Verification: Once the VBS File is executed,
In QTP 8.2 go to Test Menu -> Click on Settings-> On Properties Tab check for the loaded add-ins under Associated add-ins and check the specific Add-ins are loaded or not?
In QTP 9.2 go to File Menu -> Click on Settings-> On Properties Tab check for the loaded add-ins under Associated add-ins and check the specific Add-ins are loaded or not?
Code:
Dim QApp ' Declares a Variable
Set QApp = CreateObject ("QuickTest.Application") 'Creates an Object to Variable
QApp.SetActiveAddins Array ("Web", "ActiveX") ' Activates web and ActiveX Add-ins while launching QTP
QApp.Launch ' Requesting to Launch QTP Window
QApp.Visible = True ' Makes QTP Window as Visible
Set QApp = Nothing ' Releases the Application Object

No comments: