Active Property
Description
Indicates whether to record and run on any open Flex application (False) or to open a specified applications (True) when a record or run session begins.
Property type
Read-write property
Syntax
Visual Basic
Public Property Active As Boolean
Return Type
  • True--The FlexLauncher opens the application(s) defined in the specified FlexApplications collection when a record or run session begins.
  • False--The test is set to record and run on any open Flex applications.
  • Remarks
    • UFT records and runs only on Flex applications that are opened using the UFT Flex Runtime Loader, or Flex applications that are prepared manually for UFT testing. For details, see the Flex section of the UFT Add-ins Guide.
    • This property controls only which application, if any, is opened at the beginning of a record or run session. It does not affect the applications that UFT recognizes. Even if this property is set to True and no application is specified, UFT can still record, recognize, and run on any open UFT-ready Flex application.
    Example
    '************************************************************************************************************************
    'Description:
    '
    'This example opens UFT, loads the Web and Flex add-ins, creates a GUI test,
    'and specifies the Flex applications to be opened for the test.
    '
    'This example assumes that there is no unsaved test currently open in UFT.
    'For more information, see the example for the Test.SaveAs method.
    '************************************************************************************************************************
    Dim qtApp ' Declare the Application object variable
    Dim qtFlexLauncher ' Declare a Flex launcher variable
    
    Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
    
    qtApp.SetActiveAddins Array("Flex", "Web") ' Load the Flex and Web Add-ins
    qtApp.Launch ' Start the UFT application
    qtApp.Visible = True ' Make the UFT application visible
    qtApp.New ' Open a new test
    
    Set qtFlexLauncher = qtApp.Test.Settings.Launchers.Item("Flex") ' Return the Flex launcher
    
    qtFlexLauncher.Active = True ' Instruct UFT to open specified Flex applications when a record or run session begins
    
    ' Add an AIR application to the list of applications to open. The application must be manually prepared in advance for UFT testing.
    ' The application requires "Login" and "Password" command line paramaters.
    qtFlexLauncher.Applications.AddStandaloneApplication "C:\Program Files\MyApplication.exe", "MyName MyP@ssw0rd"
    
    ' Add a Flex application to the list of applications to open. The application must be manually prepared in advance for UFT testing.
    ' The application accepts "Login" and "Password" paramaters and should be opened in Internet Explorer.
    qtFlexLauncher.Applications.AddApplicationInIE32 "http://myserver/MyFlexApplication.swf", "Login=MyName&Password=MyP@ssw0rd"
    
    ' Add a Flex application to open using the UFT Flex Runtime Loader.
    ' The application accepts "Login" and "Password" parameters and should be opened in Internet Explorer.
    ' The Runtime Loader must be stored on the same server as the application.
    qtFlexLauncher.Applications.AddApplicationInIE32WithRuntimeLoader "http://myserver/MyFlexApplication.swf", "Login=MyName&Password=MyP@ssw0rd", "http://myserver/UFTFlexAUTLoader.swf"
    
    Set qtApp = Nothing 'Release the Application object
    Set qtFlexLauncher = Nothing 'Release the FlexLauncher object
    See Also