Visual Basic |
---|
Public Property Active As Boolean |
- UFT records and runs only on Flex applications that are opened using the UFT One Flex Runtime Loader, or Flex applications that are prepared manually for UFT One testing. For details, see the Flex section of the UFT One Help Center.
- 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 One recognizes. Even if this property is set to True and no application is specified, UFT One can still record, recognize, and run on any open UFT One-ready Flex application.
'************************************************************************************************************************ 'Description: ' 'This example opens UFT One, 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 One. '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 One application qtApp.Visible = True ' Make the UFT One 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 One 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 One testing. ' The application requires "Login" and "Password" command line parameters. 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 One testing. ' The application accepts "Login" and "Password" parameters 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 One 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