ADOBE FLEX 3
Adobe Flex 3 Data Visualization Developer Guide
About the automation interfaces
The Flex class hierarchy includes the following interfaces in the mx.automation.* package that enable automation:
About the IAutomationObjectHelper
The IAutomationObjectHelper interface helps the components accomplish the following tasks:
• Replay mouse and keyboard events; the helper generates proper sequence of player level mouse and key events.
• Generate AutomationIDPart for a child: AutomationIDPart would be requested by the Automation for repre-
senting a component instance to agents.
• Find a child matching a AutomationIDPart: Automation would request the component to locate a child
matching the AutomationIDPart supplied by an agent to it.
• Avoid synchronization issues: Agents invoke methods on Automation requesting operations on components in
a sequence. Components may not be ready all the time to perform operations.
For example, an agent can invoke comboBox.Open, comboBox.select "Item1" operations in a sequence. Because it
takes time for the drop-down list to open and initialize, it is not possible to run the select operation immediately. You
can place a wait request during the open operation execution. The wait request should provide a function for
automation, which can be invoked to check the ComboBox control’s readiness before invoking the next operation.
Automated testing workflow with the QTP automation tool
Before you automate custom components, you might find it helpful to see the order of events during which Flex’s
automation framework initializes, records, and plays back events with QTP. You should keep in mind that the QTP
adapter class’ implementation is only one way to use the automation API for automated testing.
Automated testing initialization
The user launches the Flex application. Automation initialization code associates component delegate classes
with component classes. Component delegate classes implement the IAutomationObject interface.
2 AutomationManager is a mixin. Its instance is created in the mixin init() method.
3 The SystemManager initializes the application. Component instances and their corresponding delegate
instances are created. Delegate instances add event listeners for events of interest.
4 QTPAgent class is a mixin. In its init() method, it registers itself for the FlexEvent.APPLICATION_COMPLETE
event which is dispatched from the SystemManager. On receiving the event, it creates a QTPAdapter object.
5 QTPAdapter sets up the ExternalInterface function map. QTPAdapter loads the QTP Plugin DLLs by creating
the ActiveX object to communicate with QTP.
IAutomationClass Defines the interface for a component class descriptor.
IAutomationEnvironment Provides information about the objects and properties of automatable components needed for
communicating with agents.
IAutomationEventDescriptor Defines the interface for an event descriptor.
IAutomationManager Defines the interface expected from an AutomationManager by the automation module.
IAutomationMethodDescriptor Defines the interface for a method descriptor.
IAutomationObject Defines the interface for a delegate object implementing automation for a component.
IAutomationObjectHelper Provides helper methods for the IAutomationObject interface.
IAutomationPropertyDescriptor Describes a property of a test object as well as properties of an event object.