Adding Flex Automation Capability

To enable automation through CloudTest, add Action Script functions for each of the events you want to automate in testing.

Note: Refer to Adobe Action Script documentation for Action Script conventions.

You can download an archive of this test application including the compiled object and its code, or access and download the individual source files as they occur.

How to

  1. Start by adding the following two helper functions for locating the Flex components by id in a file named
  2. Next, add a function to select a value in the combo box by its label.
  3. Then add a function to click the button.
  4. Add a function to change the value of the text input.
  5. Expose all of the automation functions that were just added to JavaScript with the following code in
  6. Then we inlcude in our mxml file and add the call to registerTestCallbacks in the onInit handler.
  7. At this point, the Flex component is ready to be tested by CloudTest. Compile the above .mxml and .as files to create FlexAUT.swf. Add the Flex object to an html page with an id of FlexAUT.
  8. Create a target to test the HTML page and then create a clip that uses that target.

What you should see

In the Clip Editor, add "flexAction" actions to invoke the automation methods defined above.

  • For the selectByLabel and setTextInput functions, which both have 2 parameters, those parameters are separated by an '@' symbol.