mx.automation.events

# AutomationRecordEvent - AS3 Flex

Package | mx.automation.events
Class | public class AutomationRecordEvent
Inheritance | AutomationRecordEvent Event Object

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The AutomationRecordEvent class represents event objects that are dispatched by the AutomationManager. Used by the functional testing classes and any other classes that must record user interactions.

Learn more

Instrumenting events

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | args : Array A serialized representation of the event as an Array of it's property values. | AutomationRecordEvent
|  | automationObject : IAutomationObject The delegate of the UIComponent object that is recording this event. | AutomationRecordEvent
|  | bubbles : Boolean [read-only] Indicates whether an event is a bubbling event. | Event
|  | cacheable : Boolean Contains true if this is a cacheable event, and false if not. | AutomationRecordEvent
|  | cancelable : Boolean [read-only] Indicates whether the behavior associated with the event can be prevented. | Event
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | currentTarget : Object [read-only] The object that is actively processing the Event object with an event listener. | Event
|  | eventPhase : uint [read-only] The current phase in the event flow. | Event
|  | name : String The automation event name. | AutomationRecordEvent
|  | recordTriggeredByCustomHandling : Boolean Contains true if this event current record is caused from a custom record event, and false if not. | AutomationRecordEvent
|  | replayableEvent : Event The underlying interaction. | AutomationRecordEvent
|  | target : Object [read-only] The event target. | Event
|  | type : String [read-only] The type of event. | Event

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | AutomationRecordEvent(type:String = "record", bubbles:Boolean = true, cancelable:Boolean = true, automationObject:IAutomationObject = null, replayableEvent:Event = null, args:Array = null, name:String = null, cacheable:Boolean = false, recordTriggeredByCustomHandling:Boolean = false)
Constructor.
AutomationRecordEvent
|  | clone():Event Duplicates an instance of an Event subclass. | Event
|  | formatToString(className:String, ... arguments):String A utility function for implementing the toString() method in custom ActionScript 3.0 Event classes. | Event
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isDefaultPrevented():Boolean Checks whether the preventDefault() method has been called on the event. | Event
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | preventDefault():void Cancels an event's default behavior if that behavior can be canceled. | Event
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | stopImmediatePropagation():void Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow. | Event
|  | stopPropagation():void Prevents processing of any event listeners in nodes subsequent to the current node in the event flow. | Event
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns a string containing all the properties of the Event object. | Event
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined By
--- | --- | ---
|  | CUSTOM_RECORD : String = "customRecord" [static] refer recordCustomAutomationEvent in IAutomationManager for the usage of this constant | AutomationRecordEvent
|  | RECORD : String = "record" [static] The AutomationRecordEvent.RECORD constant defines the value of the type property of the event object for a record event. | AutomationRecordEvent

Property Detail

### args

property

`public var args:Array`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

A serialized representation of the event as an Array of it's property values.

### automationObject

property

`public var automationObject:IAutomationObject`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The delegate of the UIComponent object that is recording this event.

### cacheable

property

`public var cacheable:Boolean`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Contains `true` if this is a cacheable event, and `false` if not.

### name

property

`public var name:String`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The automation event name.

### recordTriggeredByCustomHandling

property

`public var recordTriggeredByCustomHandling:Boolean`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Contains `true` if this event current record is caused from a custom record event, and `false` if not. User can use this field to differentiate the record event triggered by the framework and the custom record. e.g if the list has the select event and currently it recors the selection details either with index or with the selected item. But user would like to record the details with both but would like to record it with the same event name, it will be pretty cumborosome to differentiate the select event triggerd by framework and the one triggered by using the recordCustomAutomationEvent() API on the automation manager. If the event was triggered using the recordCustomAutomationEvent() API this flag will be true. In all other cases framework will keep this flag with the default value

### replayableEvent

property

`public var replayableEvent:Event`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The underlying interaction.

Constructor Detail

### AutomationRecordEvent

()
Constructor

`public function AutomationRecordEvent(type:String = "record", bubbles:Boolean = true, cancelable:Boolean = true, automationObject:IAutomationObject = null, replayableEvent:Event = null, args:Array = null, name:String = null, cacheable:Boolean = false, recordTriggeredByCustomHandling:Boolean = false)`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructor.

Parameters

| `type:String` (default = "`record`")`` — The event type; indicates the action that caused the event.
| `bubbles:Boolean` (default = `true`)`` — Whether the event can bubble up the display list hierarchy.
| `cancelable:Boolean` (default = `true`)`` — Whether the behavior associated with the event can be prevented.
| `automationObject:IAutomationObject` (default = `null`)`` — Delegate of the UIComponent that is dispatching the interaction.
| `replayableEvent:Event` (default = `null`)`` — Underlying event that represents the interaction.
| `args:Array` (default = `null`)`` — Array of arguments that are passed to the method that is currently being recorded.
| `name:String` (default = `null`)`` — Displayable name of the operation.
| `cacheable:Boolean` (default = `false`)`` — `true` if the event should be saved in the event cache, and `false` if not.
| `recordTriggeredByCustomHandling:Boolean` (default = `false`)``

Constant Detail

### CUSTOM_RECORD

Constant

`public static const CUSTOM_RECORD:String = "customRecord"`

refer recordCustomAutomationEvent in IAutomationManager for the usage of this constant

### RECORD

Constant

`public static const RECORD:String = "record"`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The `AutomationRecordEvent.RECORD` constant defines the value of the `type` property of the event object for a `record` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`args` | Array of arguments to the method.
`automationObject` | Delegate of the UIComponent that is dispatching the interaction.
`bubbles` | true
`cacheable` | `true` if the event should be saved in the event cache, and `false` if not.
`cancelable` | true
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`methodName` | A displayable Name of the operation
`replayableEvent` | Underlying event that represents the interaction.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

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