Launchers Collection

Launchers Collection

Description

A collection of Launcher objects, which enable you to specify which applications to open when a record or run session begins.

Remarks

This object corresponds to the tabs in the Record and Run Settings dialog box.  The following objects are available, provided you installed and loaded the relevant add-ins:

Example
'************************************************************************************************************************
'Description:
'
'This example starts UFT, opens a new test, and configures it for recording and running on a Web application.
'
'Assumptions:
'UFT is not open.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the application object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the application object

ret = qtApp.SetActiveAddins(Array("Web","ActiveX"), errDesc) 'Load the Web and ActiveX Add-ins

qtApp.Launch ' Start UFT
qtApp.New ' Open a new test

' Configure the Web application to use with this test
qtApp.Test.Settings.Launchers("Web").Active = True
qtApp.Test.Settings.Launchers("Web").Browser = "IE"
qtApp.Test.Settings.Launchers("Web").Address = "http://newtours.demoaut.com "
qtApp.Test.Settings.Launchers("Web").CloseOnExit = True

' Configure Active Screen access settings
qtApp.Test.Settings.Web.ActiveScreenAccess.UserName = "user1"
qtApp.Test.Settings.Web.ActiveScreenAccess.Password = "mypassword"

' Configure other Web settings
qtApp.Test.Settings.Web.BrowserNavigationTimeout = 60000
qtApp.Visible = True ' Make the UFT application visible
Set qtApp = Nothing ' Release the Application object
'************************************************************************************************************************
'Description:
'
'This example starts UFT, opens a new test, and configures it for 'recording and running on a Siebel 7.7 application with AutoLogin feature 'active.
'
'Assumptions:
'UFT is not open.
'************************************************************************************************************************
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.SetActiveAddins Array("Siebel") ' Activate the Siebel Add-in
qtApp.Launch ' Start UFT
qtApp.New ' Open a new test
' Configure the Siebel application version to use with this test
qtApp.Test.Settings.Launchers("Siebel").Active = True
qtApp.Test.Settings.Launchers("Siebel").Version = "77"
' Specify the URL and configure the browser settings to use with this test
qtApp.Test.Settings.Launchers("Siebel").Address = "http://Siebel_application.url"
qtApp.Test.Settings.Launchers("Siebel").LogoutOnExit = False
qtApp.Test.Settings.Launchers("Siebel").CloseOnExit = True
' Configure the Auto-login parameters to use with this test
qtApp.Test.Settings.Launchers("Siebel").AutoLogin = True
qtApp.Test.Settings.Launchers("Siebel").User = "username"
qtApp.Test.Settings.Launchers("Siebel").Password = "mypassword"
' Configure the advanced timeout and access settings specific for the Siebel 7.7 application
qtApp.Test.Settings.Launchers("Siebel").SiebAutomationRequestTimeout = 120
qtApp.Test.Settings.Launchers("Siebel").SiebAutomationAccessCode = "aCode"
qtApp.Visible = True ' Make the UFT application visible
Set qtApp = Nothing ' Release the Application object
'************************************************************************************************************************
'Description:
'
'This example starts UFT, opens a new test, and configures it for recording and running
'on an SAP Gui for Windows application.
'
'Assumptions:
'UFT is not open.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object

qtApp.SetActiveAddins Array("SAP") ' Load the SAP Add-in.
qtApp.Launch ' Start UFT
qtApp.New ' Open a new test

' Configure the SAP Record and Run settings to open an SAP Gui for Windows application with these settings:
qtApp.Test.Settings.Launchers("SAP").Active = True 'Open a new SAP Gui for Windows session when recording begins
qtApp.Test.Settings.Launchers("SAP").Server = "R/3 Enterprise" 'Launch SAP Gui for Windows and connect to the "R/3 Enterprise" Server
qtApp.Test.Settings.Launchers("SAP").AutoLogon = True 'Perform auto login using the logon details below
qtApp.Test.Settings.Launchers("SAP").Client = "800" 'Number for SAP client
qtApp.Test.Settings.Launchers("SAP").User = "QA01" 'User name for SAP server
qtApp.Test.Settings.Launchers("SAP").Password = "3f5aea819b0239" 'Password should be set as an encrypted string
qtApp.Test.Settings.Launchers("SAP").Language = "EN" 'Use English for UI language
qtApp.Test.Settings.Launchers("SAP").RememberPassword = True 'Save the logon password for use in future test runs
qtApp.Test.Settings.Launchers("SAP").CloseOnExit = True 'Close this SAP Gui for Windows session when exiting this test
qtApp.Test.Settings.Launchers("SAP").IgnoreExistingSessions = True 'Do not record or run tests on any SAP sessions that are already open prior to the start of the record or run session

qtApp.Visible = True ' Make the UFT application visible
Set qtApp = Nothing ' Release the Application object
'************************************************************************************************************************
'Description:
'
'This example starts UFT, opens a new test, and configures
'it for recording and running on a Java application.
'
'Assumptions:
'UFT is not open.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the application object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the application object

qtApp.SetActiveAddins Array("Java") ' Activate the Java Add-in
qtApp.Launch ' Start UFT
qtApp.New ' Open a new test

' Configure the Java application to use with this test
qtApp.Test.Settings.Launchers("Java").Active = True
qtApp.Test.Settings.Launchers("Java").CommandLine = "C:\j2sdk1.4.2\bin\java.exe -jar C:\j2sdk1.4.2\demo\jfc\SwingSet2\SwingSet2.jar"
qtApp.Test.Settings.Launchers("Java").WorkingDirectory = "C:\j2sdk1.4.2\demo\jfc\SwingSet2"

qtApp.Visible = True ' Make the UFT application visible
Set qtApp = Nothing ' Release the Application object
'************************************************************************************************************************
'Description:
'
'This example starts UFT, opens a new test, and configures it for
'recording and running on an Oracle Application with AutoLogin feature active.
'
'Assumptions:
'UFT is not open.
'************************************************************************************************************************
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.SetActiveAddins Array("Oracle") ' Activate the Oracle Add-in
qtApp.Launch ' Start UFT
qtApp.New ' Open a new test
' Specify the URL and configure the browser settings to use with this test
qtApp.Test.Settings.Launchers("Oracle").Active = True
qtApp.Test.Settings.Launchers("Oracle").Address = "http://Oracle_application.url"
qtApp.Test.Settings.Launchers("Oracle").LogoutOnExit = False
qtApp.Test.Settings.Launchers("Oracle").CloseOnExit = True
' Configure the Auto-login parameters to use with this test
qtApp.Test.Settings.Launchers("Oracle").AutoLogin = True
qtApp.Test.Settings.Launchers("Oracle").User = "username"
qtApp.Test.Settings.Launchers("Oracle").Password = "mypassword"
qtApp.Visible = True ' Make the UFT application visible
Set qtApp = Nothing ' Release the Application object
Example
AddApplicationInIE32 Method  | Specify the Application to Open for a Record and Run Session
Public Properties
Public Property Count The number of Launcher objects in the collection.
Public Property Item Returns the Launcher object located in the specified position.
See Also

Launchers Members