Visual Basic |
---|
Public Property Active As Boolean |
- You can records and run tests only on Flex applications that are opened using the OpenText Functional Testing Flex Runtime Loader, or Flex applications that are prepared manually for OpenText Functional Testing testing. For details, see the Flex section of the OpenText Functional Testing 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 can be tested. Even if this property is set to True and no application is specified, you can still record and run on any open Flex application that was prepared for testing.
'************************************************************************************************************************ 'Description: ' 'This example opens the testing application, 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. '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 testing application qtApp.Visible = True ' Make the application visible qtApp.New ' Open a new test Set qtFlexLauncher = qtApp.Test.Settings.Launchers.Item("Flex") ' Return the Flex launcher qtFlexLauncher.Active = True ' Instruct OpenText Functional Testing 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 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 OpenText Functional Testing 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 OpenText Functional Testing 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