Working with the Flex Add-in

Consider the following when working with the Flex Add-in :

Working with or without the Web Add-in

You can use the Flex Add-in with or without the Web Add-in enabled. The test object hierarchy differs as follows:

  • With the Web Add-in enabled. Flex test objects have a Web parent hierarchy.

    For example:

    Browser.Page.FlexWindow.FlexButton

  • Without the Web Add-in enabled. Flex objects have a Windows parent hierarchy.

    For example:

    Window.WinObject.FlexWindow.FlexButton

We recommend enabling the Web Add-in when you are testing Flex applications so that you can test Flex applications in browser windows.

Register local Web-based Flex applications as trusted applications

Local Web-based Flex applications are Flex applications that are stored locally and run in a browser window. UFT does not recognize local Web-based Flex applications as Flex test objects unless all relevant elements are registered as trusted applications:

  • In all cases, your local Flex application and its HTML wrapper must be registered.
  • If you are opening your local Web applications using a (local) runtime loader file you also need to register the (local) Flex Runtime Loader file.
  • If you use the Open the following applications when a record or run session begins option in the Flex tab of the Record and Run Settings dialog box and you set a local Web-based Flex application to be opened using a runtime loader, then UFT automatically creates an HTML wrapper for your application and stores the wrapper in your user profile %temp% folder (For example, C:\Users\myname\AppData\Local\Temp). In this case, you must additionally register the %temp% folder.

To register your local Web-based Flex applications, the HTML-wrappers, the and Runtime Loader file, add the paths of the folders that contain them (along with the %temp% folder if relevant) to one of the following:

  • If you have an Internet connection, you can use the Trusted Locations list in the Flash Player Global Settings:

    Use this link to access the Settings pane: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html and select Edit locations > Add location to edit the list).

  • Otherwise, add or edit a text file located in the FlashPlayerTrust folder in the following location: %appdata%\Macromedia\Flash Player\#Security\FlashPlayerTrust

    Each line in the text file must contain the name of a folder to trust. For each specified folder, all files in that folder or any sub-folders are trusted. For example:

    # Trust all files in the Employee online calendar application folder 
    %ProgramFiles%\Personnel\Employees\OnlineCalendar 

    The %appdata% folder is hidden in Windows by default. To show hidden folders, open the Windows Explorer Folder Options dialog box and select Show hidden files and folders.

    Create the #Security\FlashPlayerTrust folder, if it does not exist.

    The UFT Flex Runtime Loader files are installed with UFT, in the <UFT installation folder>\dat\Flash\Flex\Runtime Loader folder.