mx.automation

# IAutomationManager2 - AS3 Flex

Package | mx.automation
Interface | public interface IAutomationManager2 extends IAutomationManager , IEventDispatcher
Implementors | AutomationManager

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

The IAutomationManager interface defines the interface expected from an AutomationManager object by the automation module.

More examples

Testing sub-applications

Learn more

Understanding the automation framework

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | automationEnvironment : Object The automation environment for this automation manager. | IAutomationManager
|  | automationEnvironmentHandlingClassName : String [write-only] Marshalling Support(for tool): The tool class which is responsible for handling the automation environment. | IAutomationManager2
|  | automationEnvironmentString : String [write-only] The automation environment for this automation manager. | IAutomationManager2
|  | recording : Boolean [read-only] Indicates whether recording is taking place. | IAutomationManager
|  | replaying : Boolean [read-only] Indicates whether replay is taking place. | IAutomationManager

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | IEventDispatcher
|  | addEventListenersToAllChildApplications(eventDetailsArray:Array):void Marshalling Support(for tool): Adds the passed EventDetails objects to the probable child applications in the current ApplicationDomain. | IAutomationManager2
|  | addEventListenersToAllParentApplications(eventDetailsArray:Array):void Marshalling Support(for tool): Adds the passed EventDetails objects to the probable parent applications in the current ApplicationDomain. | IAutomationManager2
|  | beginRecording():void Sets the automation manager to record mode. | IAutomationManager
|  | createID(obj:IAutomationObject, relativeToParent:IAutomationObject = null):AutomationID Returns an id for the given object that can be used with the resolveID() method. | IAutomationManager
|  | createIDPart(obj:IAutomationObject, parent:IAutomationObject = null):AutomationIDPart Returns an id part for the given object that can be used in the resolveIDPart() method. | IAutomationManager
|  | decrementCacheCounter(clearNow:Boolean = false):int Decrement the cache counter. | IAutomationManager
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | IEventDispatcher
|  | dispatchToAllChildren(event:Event):void Marshalling Support(for tool): Dispatches event to all children. | IAutomationManager2
|  | dispatchToParent(event:Event):void Marshalling Support(for tool): Dispatches event to parent applications. | IAutomationManager2
|  | endRecording():void Takes the automation manager out of record mode. | IAutomationManager
|  | getAIRWindow(windowId:String):DisplayObject AIR support(for tool): Returns the window with the passed id. | IAutomationManager2
|  | getAIRWindowUniqueID(newWindow:DisplayObject):String AIR support(for tool): Returns the unique id of the window object. | IAutomationManager2
|  | getAIRWindowUniqueIDFromAutomationIDPart(objectIdPart:AutomationIDPart):String AIR support(for tool): Returns the unique ID of window from the automation ID part. | IAutomationManager2
|  | getAIRWindowUniqueIDFromObjectIDString(objectId:String):String AIR support(for tool): Returns the unique ID of window from the object ID. | IAutomationManager2
|  | getApplicationNameFromAutomationIDPart(objectID:AutomationIDPart):String Marshalling Support(for tool): Returns name of the application from the part id. | IAutomationManager2
|  | getAutomationClassName(obj:IAutomationObject):String Returns the text to display as the type of the object. | IAutomationManager
|  | getAutomationName(obj:IAutomationObject):String Returns the text to display as the description for the object. | IAutomationManager
|  | getChildren(obj:IAutomationObject, ignoreShowInHierarchy:Boolean = false):Array Returns all children of this object that are visible within the testing hierarchy. | IAutomationManager
|  | getChildrenFromIDPart(obj:IAutomationObject, part:AutomationIDPart = null, ignoreShowInHierarchy:Boolean = false):Array Returns all children of this object that are visible within the testing hierarchy and meet the criteria in the automation part. | IAutomationManager
|  | getElementFromPoint(x:int, y:int):IAutomationObject Returns the automation object under the given coordinate. | IAutomationManager
|  | getElementFromPoint2(x:int, y:int, windowId:String):IAutomationObject AIR support(for tool): Returns the automation object under the given coordinate in a window. | IAutomationManager2
|  | getParent(obj:IAutomationObject, parentToStopAt:IAutomationObject = null, ignoreShowInHierarchy:Boolean = false):IAutomationObject Returns the next parent that is visible within the automation hierarchy. | IAutomationManager
|  | getPopUpChildObject(index:int):IAutomationObject Marshalling Support(for delegates):Returns array of pop up objects of the root application. | IAutomationManager2
|  | getPopUpChildren():Array Marshalling Support(for delegates):Returns array of pop up objects of the top level application. | IAutomationManager2
|  | getPopUpChildrenCount():Number Marshalling Support(for delegates):Returns the number of pop up children of the top level application. | IAutomationManager2
|  | getProperties(obj:IAutomationObject, names:Array = null, forVerification:Boolean = true, forDescription:Boolean = true):Array Returns the values for a set of properties. | IAutomationManager
|  | getRectangle(obj:DisplayObject):Array The display rectangle enclosing the DisplayObject. | IAutomationManager
|  | getStartPointInScreenCoordinates(windowId:String):Point AIR support(for tool): Used by Flex application loaded from AIR application, to get the start point of main AIR application in screen coordinates | IAutomationManager2
|  | getTabularData(obj:IAutomationObject):mx.automation:IAutomationTabularData Returns the object implementing the IAutomationTabularData interface through which the tabular data can be obtained. | IAutomationManager
|  | getTopApplicationIndex(objectList:Array):int Marshalling Support(for tool): Returns the index of top visible object among the passed array of objects. | IAutomationManager2
|  | getUniqueApplicationID():String Marshalling Support(for tool): Returns unique ID of the application considering the hierarchy using the SWFLoader information and the application name. | IAutomationManager2
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | IEventDispatcher
|  | incrementCacheCounter():int Increments the cache counter. | IAutomationManager
|  | isObjectPopUp(obj:IAutomationObject):Boolean Marshalling Support(for tool): Returns true if the passed object is a pop up. | IAutomationManager2
|  | isSynchronized(target:IAutomationObject):Boolean Tests if the provided target needs to wait until a previous operation completes. | IAutomationManager
|  | isVisible(obj:DisplayObject):Boolean Returns true if an object and all of its parents are visible. | IAutomationManager
|  | recordAutomatableEvent(recorder:IAutomationObject, event:Event, cacheable:Boolean = false):void Records the event. | IAutomationManager
|  | recordCustomAutomationEvent(customEvent:AutomationRecordEvent):Boolean Records the custom event. | IAutomationManager
|  | registerNewApplication(application:DisplayObject):void Marshalling Support(for delegates): When a new application is added, application delegate registers itself so that appropriate listeners are added to that in order to support Marshalling. | IAutomationManager2
|  | registerNewFlexNativeMenu(menu:Object, sm:DisplayObject):void AIR Support(for delegates): When a FlexNativeMenu is added to a component, its delegate registers the new FlexNativeMenu object and creates a delegate. | IAutomationManager2
|  | registerNewWindow(newWindow:DisplayObject):void AIR Support(for delegates): When a new window is added, WindowedApplication delegate registers the new window object so that a unique id is created for that window. | IAutomationManager2
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | IEventDispatcher
|  | replayAutomatableEvent(event:AutomationReplayEvent):Boolean Replays the specified event. | IAutomationManager
|  | resolveID(rid:AutomationID, currentParent:IAutomationObject = null):Array Resolves an id to automation objects. | IAutomationManager
|  | resolveIDPart(parent:IAutomationObject, part:AutomationIDPart):Array Resolves an id part to an Array of automation objects. | IAutomationManager
|  | resolveIDPartToSingleObject(parent:IAutomationObject, part:AutomationIDPart):IAutomationObject Resolves an id part to an automation object within the parent. | IAutomationManager
|  | resolveIDToSingleObject(rid:AutomationID, currentParent:IAutomationObject = null):IAutomationObject Resolves an id to an automation object. | IAutomationManager
|  | showInHierarchy(obj:IAutomationObject):Boolean Indicates whether an automation object should be visible within the hierarchy. | IAutomationManager
|  | storeDragProxy(dragProxy:Object):void Marshalling Support(for delegates): Stores the drag proxy to enable inter-application drag-drop.DragProxy created in one application should be accessible by another application if required. | IAutomationManager2
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | IEventDispatcher

Property Detail

### automationEnvironmentHandlingClassName

property

`automationEnvironmentHandlingClassName:String` [write-only]

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): The tool class which is responsible for handling the automation environment.

Implementation
`public function set automationEnvironmentHandlingClassName(value:String):void`

### automationEnvironmentString

property

`automationEnvironmentString:String` [write-only]

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

The automation environment for this automation manager. The automation environment provides information about the objects and properties of testable components needed for communicating with agent tools. The value of this property must implement the IAutomationEnvironment interface.

Implementation
`public function set automationEnvironmentString(value:String):void`

Related API Elements

mx.automation.IAutomationEnvironment
Method Detail

### addEventListenersToAllChildApplications

()
method

`public function addEventListenersToAllChildApplications(eventDetailsArray:Array):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): Adds the passed EventDetails objects to the probable child applications in the current ApplicationDomain. AutomationManager identifies the child applications in the current ApplicationDomain as and when the application is loaded, and adds appropriate listeners obtained from the passed objects.

Parameters

| `eventDetailsArray:Array` — Array of EventDetails objects.

### addEventListenersToAllParentApplications

()
method

`public function addEventListenersToAllParentApplications(eventDetailsArray:Array):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): Adds the passed EventDetails objects to the probable parent applications in the current ApplicationDomain. AutomationManager identifies the parent applications in the current ApplicationDomain which are responsible to listen to the events from children and adds appropriate listeners obtained from the passed objects.

Parameters

| `eventDetailsArray:Array` — Array of EventDetails objects.

### dispatchToAllChildren

()
method

`public function dispatchToAllChildren(event:Event):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): Dispatches event to all children.

Parameters

| `event:Event` — Event to be dispatched.

### dispatchToParent

()
method

`public function dispatchToParent(event:Event):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): Dispatches event to parent applications.

Parameters

| `event:Event` — Event to be dispatched.

### getAIRWindow

()
method

`public function getAIRWindow(windowId:String):DisplayObject`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

AIR support(for tool): Returns the window with the passed id.

Parameters

| `windowId:String` — id of the window

Returns

| `DisplayObject` — Window with passed id.

### getAIRWindowUniqueID

()
method

`public function getAIRWindowUniqueID(newWindow:DisplayObject):String`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

AIR support(for tool): Returns the unique id of the window object.

Parameters

| `newWindow:DisplayObject` — window whose id is to required.

Returns

| `String` — String

### getAIRWindowUniqueIDFromAutomationIDPart

()
method

`public function getAIRWindowUniqueIDFromAutomationIDPart(objectIdPart:AutomationIDPart):String`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

AIR support(for tool): Returns the unique ID of window from the automation ID part. Automation ID part has application ID and window ID.

Parameters

| `objectIdPart:AutomationIDPart` — The AutomationIDPart from which unique ID of the window is to be obtained.

Returns

| `String`

### getAIRWindowUniqueIDFromObjectIDString

()
method

`public function getAIRWindowUniqueIDFromObjectIDString(objectId:String):String`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

AIR support(for tool): Returns the unique ID of window from the object ID. Object ID has application ID and window ID.

Parameters

| `objectId:String` — The object ID from which unique ID of the window is to be obtained.

Returns

| `String`

### getApplicationNameFromAutomationIDPart

()
method

`public function getApplicationNameFromAutomationIDPart(objectID:AutomationIDPart):String`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): Returns name of the application from the part id.

Parameters

| `objectID:AutomationIDPart` — AutomationIDPart from which the application name is obtained.

Returns

| `String`

### getElementFromPoint2

()
method

`public function getElementFromPoint2(x:int, y:int, windowId:String):IAutomationObject`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

AIR support(for tool): Returns the automation object under the given coordinate in a window.

Parameters

| `x:int` — The x coordinate.
| `y:int` — The y coordinate.
| `windowId:String` — The window on which the object is to be identified.

Returns

| `IAutomationObject` — Automation object at that point.

### getPopUpChildObject

()
method

`public function getPopUpChildObject(index:int):IAutomationObject`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for delegates):Returns array of pop up objects of the root application. All pop up objects created in an application are added as pop up children to the top level application of its ApplicationDomain.

Parameters

| `index:int` — at which the object is to be retrieved

Returns

| `IAutomationObject` — IAutomationObject at the given index

### getPopUpChildren

()
method

`public function getPopUpChildren():Array`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for delegates):Returns array of pop up objects of the top level application. All pop up objects created in an application are added as pop up children to the top level application of its ApplicationDomain.

Returns

| `Array` — Array of pop up children

### getPopUpChildrenCount

()
method

`public function getPopUpChildrenCount():Number`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for delegates):Returns the number of pop up children of the top level application. All pop up objects created in an application are added as pop up children to the top level application of its ApplicationDomain.

Returns

| `Number` — Number of pop up children

### getStartPointInScreenCoordinates

()
method

`public function getStartPointInScreenCoordinates(windowId:String):Point`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

AIR support(for tool): Used by Flex application loaded from AIR application, to get the start point of main AIR application in screen coordinates

Parameters

| `windowId:String`

Returns

| `Point`

### getTopApplicationIndex

()
method

`public function getTopApplicationIndex(objectList:Array):int`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): Returns the index of top visible object among the passed array of objects. This can be used by tools to identify the topmost Application object when there are multiple objects from different applications, which belong to different ApplicationDomain or different SecurityDomain, under the mouse.

Parameters

| `objectList:Array` — Array of objects

Returns

| `int`

### getUniqueApplicationID

()
method

`public function getUniqueApplicationID():String`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): Returns unique ID of the application considering the hierarchy using the SWFLoader information and the application name.

Returns

| `String`

### isObjectPopUp

()
method

`public function isObjectPopUp(obj:IAutomationObject):Boolean`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for tool): Returns true if the passed object is a pop up.

Parameters

| `obj:IAutomationObject` — IAutomationObject

Returns

| `Boolean`

### registerNewApplication

()
method

`public function registerNewApplication(application:DisplayObject):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for delegates): When a new application is added, application delegate registers itself so that appropriate listeners are added to that in order to support Marshalling.

Parameters

| `application:DisplayObject` — Application object to be registered.

### registerNewFlexNativeMenu

()
method

`public function registerNewFlexNativeMenu(menu:Object, sm:DisplayObject):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

AIR Support(for delegates): When a FlexNativeMenu is added to a component, its delegate registers the new FlexNativeMenu object and creates a delegate.

Parameters

| `menu:Object` — FlexNativeMenu object to be registered.
| `sm:DisplayObject` — SystemManager of the component in which FlexNativeMenu is added.

### registerNewWindow

()
method

`public function registerNewWindow(newWindow:DisplayObject):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

AIR Support(for delegates): When a new window is added, WindowedApplication delegate registers the new window object so that a unique id is created for that window.

Parameters

| `newWindow:DisplayObject` — Window object to be registered.

### storeDragProxy

()
method

`public function storeDragProxy(dragProxy:Object):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 4

Runtime Versions: | Flash Player 9, AIR 1.1

Marshalling Support(for delegates): Stores the drag proxy to enable inter-application drag-drop.DragProxy created in one application should be accessible by another application if required.

Parameters

| `dragProxy:Object` — object

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00