Adobe Flex

Top  Previous  Next

Purpose

SmarteStudio includes support for Adobe Flex applications executed

inside Adobe Flash Player in Internet Explorer or Firefox
and Adobe Integrated Runtime (AIR).

 

Usage

To test Flex applications, you must have Flex Builder installed.  Link your application with FlexAdapter.swc (part of SmarteStudio) and automation_agent.swc and automation.swc (part of Flex Builder).

 

The compiler arguments should look like:

 

-include-libraries "C:/Program Files/Adobe/Flex Builder 3/sdks/3.2.0/frameworks/libs/

automation_agent.swc" "C:/Program Files/Adobe/Flex Builder 3/sdks/3.2.0/frameworks/libs/

automation.swc" "C:/Program Files/SmarteSoft/SmarteStudio/Extensions/Flex/FlexAdapter/bin/FlexAdapter.swc"

 

Note: You may avoid linking with third-party libraries if your application is browser-based and you will use FlexLoader.

 

Adobe Flash Player

Adobe Flash Player has restricted security settings for SWFs opened from the file system. To enable testing of such SWFs, their corresponding folders must be listed in the FlashPlayerTrust directory.  You can find the FlashPlayerTrust directory here:

<system>\Macromed\Flash\FlashPlayerTrust

 

to enable testing just for the current user, use this FlashPlayerTrust directory:

<ApplicationData>\Macromedia\Flash Player\#Security\FlashPlayerTrust

 

To register your SWF just create a file with the name "<name of your SWF>.cfg" and put it in this directory. In the file, write a path to the SWF folder.

 

Note: If you do not have FlashPlayerTrust directory in one of locations listed above then you will have to create missing directories yourself.

 

Adobe AIR

To record and playback tests for Adobe AIR application you need to run the application manually. E.g.:

 

"C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin\adl.exe" C:\Program Files\SmarteSoft\SmarteStudio\Samples\AdobeFlex\AUTFlexAIR\bin-debug\AUTFlexAIR-app.xml

 

Sample Applications and Test

Two sample Flex applications are available with the SmarteStudio installation.   They can be found at <smartestudio install dir>/Samples/AdobeFlex/AUTFlexFP/bin-debug/AUTFlexFP.html and <smartestudio install dir>/Samples/AdobeFlex/AUTFlexAIR/bin-debug/AUTFlexAIR-app.xml. The binaries and source are both provided.

 

Sample test for the sample applications can be found in <smartestudio install dir>/Samples/AdobeFlex. To select the target for testing edit the following line in AdobeFlex.user.js file:

 

/**

 * Select flex target for testing.

 */

var testTarget = "FlexIE"; //"FlexAIR", "FlexFirefox", "FlexIE"

 

Note: If you choose AIR target, please, do not forget to run the sample application before executing the test.

 

See Also

Tutorial: Testing Adobe Flex Applications