Compile Flex applications for UFT testing

This task describes how to compile your Flex applications for UFT testing.

This method can be used for all supported Flex application types.

Note:  

  • For all Flex applications except Adobe Air: When you compile your Flex application with a UFT Flex pre-compiled agent, you must set the Flash Player target version to 10.0 or later.

  • If you do not want to recompile your Flex application, and you are testing an HTML or SWF application, you can choose an alternative method of enabling UFT to communicate with your Flex application.  For details, see Enabling UFT to identify objects in your Flex application.

Prepare a Flex application for Web

  1. Link the Flex application to Adobe or Apache Flex automation libraries and a UFT Flex pre-compiled agent. To do this, add the following compiler arguments in the Flex project, and then recompile the application:

    For all Flex versions except Flex SDK 3.6:

    -include-libraries "<PATH_TO_UFT_ROOT>\dat\Flash\Flex\HpQTPAgent.swc" 
    -include-libraries "${flexlib}\libs\automation\automation_agent.swc" 
    -include-libraries "${flexlib}\libs\automation\automation.swc" 
    -include-libraries "${flexlib}\libs\automation\automation_spark.swc" 

    For Flex SDK 3.6:

    -include-libraries "<PATH_TO_UFT_ROOT>\dat\Flash\Flex\HpQTPAgent_3_6.swc" 
    -include-libraries "${flexlib}\libs\automation\automation_agent.swc" 
    -include-libraries "${flexlib}\libs\automation\automation.swc" 
  2. Embed the Flex application in a host .html document.
  3. When testing, run your application by opening the host document in a Web browser.

Prepare a Flex application for Adobe AIR for testing

Link the Flex AIR application to Adobe or Apache Flex automation libraries and a UFT Flex pre-compiled agent. To do this, add the following compiler argument in the Flex AIR project, and then recompile the application:

-include-libraries "<PATH_TO_UFT_ROOT>\dat\Flash\Flex\HpQTPAgent.swc" 
-include-libraries "${flexlib}\libs\automation\automation_agent.swc" 
-include-libraries "${flexlib}\libs\automation\automation.swc" 
-include-libraries "${flexlib}\libs\automation\automation_spark.swc"
-include-libraries "${flexlib}\libs\automation\automation_air.swc"
-include-libraries "${flexlib}\libs\automation\automation_airspark.swc"

Back to top

Prepare a hosted Flex application

  1. Link the Flex application to Adobe or Apache Flex automation libraries and a UFT Flex pre-compiled agent. To do this, add the following compiler argument in the Flex project, and then recompile the application:

    -include-libraries "<PATH_TO_UFT_ROOT>\dat\Flash\Flex\HpQTPAgent.swc" 
    -include-libraries "${flexlib}\libs\automation\automation_agent.swc" 
    -include-libraries "${flexlib}\libs\automation\automation.swc" 
    -include-libraries "${flexlib}\libs\automation\automation_spark.swc"
  2. When testing, run your application by opening it in one of the following:

    • an Adobe Flash Player ActiveX control

    • the Adobe Flash Player Projector

Back to top

Prepare a Flex applicationwith the Flex charting or AdvancedDataGrid classes

Link the Flex application to the automation_dmv.swc library. To do this, add the following compiler argument in the Flex project and then recompile your application:

-include-libraries "${flexlib}\libs\automation\automation_dmv.swc"

Back to top