(Flex 2 Plug-in for Mercury Quick Test Pro)
The IAutomationManager interface defines the interface expected
from an AutomationManager object by the automation module.
automationEnvironment:Object [read-write]
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 get automationEnvironment():Object
public function set automationEnvironment(value:Object):void
See also
recording:Boolean [read-only]
Indicates whether recording is taking place, true,
or not, false.
Implementation
public function get recording():Boolean
replaying:Boolean [read-only]
Indicates whether replay is taking place, true,
or not, false.
Implementation
public function get replaying():Boolean
public function beginRecording():void
Sets the automation manager to record mode.
public function createID(obj:IAutomationObject, relativeToParent:IAutomationObject = null):AutomationID
Returns an id for the given object that can be used
with the resolveID() method.
Parameters
Returns
| AutomationID —
AutomationID object which represents the Automation object.
|
public function createIDPart(obj:IAutomationObject, parent:IAutomationObject = null):AutomationIDPart
Returns an id part for the given object that can be used in resolveIDPart.
Parameters
Returns
| AutomationIDPart —
AutomationIDPart object which represents the Automation object.
|
public function decrementCacheCounter(clearNow:Boolean = false):int
Decrement the cache counter. The cache is cleared when
the count reaches zero.
Parameters
| clearNow:Boolean (default = false) — If true, clear the cache regardless of the cache counter.
|
Returns
| int —
Current cache counter.
|
public function endRecording():void
Takes the automation manager out of record mode.
public function getAutomationClassName(obj:IAutomationObject):String
Returns the text to display as the type of the object.
Parameters
Returns
public function getAutomationName(obj:IAutomationObject):String
Returns the text to display as the description for the object.
Parameters
Returns
| String —
Text description of the Automation object.
|
public function getChildren(obj:IAutomationObject, ignoreShowInHierarchy:Boolean = false):Array
Returns all children of this object that are visible within the testing
hierarchy. If a child is not visible within the hierarchy,
returns the children of the invisible child.
Parameters
Returns
| Array —
Array of children.
|
public function 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.
If a child is not visible within the hierarchy, this method
returns the children of the invisible child.
Parameters
| obj:IAutomationObject — Object for which to get the children.
|
| |
| part:AutomationIDPart (default = null) — Criteria of which children to return.
|
| |
| ignoreShowInHierarchy:Boolean (default = false) — Boolean that determines whether object is ignored
within the automation hierarchy. The default value is false.
|
Returns
| Array —
Array of children matching the criteria.
|
public function getElementFromPoint(x:int, y:int):IAutomationObject
Returns the automation object under the given coordinate.
Parameters
| x:int — The x coordinate.
|
| |
| y:int — The y coordinate.
|
Returns
public function getParent(obj:IAutomationObject, parentToStopAt:IAutomationObject = null, ignoreShowInHierarchy:Boolean = false):IAutomationObject
Returns the next parent that is visible within the automation hierarchy.
Parameters
| obj:IAutomationObject — Automation object.
|
| |
| parentToStopAt:IAutomationObject (default = null) — Parent of the given automation object.
|
| |
| ignoreShowInHierarchy:Boolean (default = false) — Boolean that determines whether object is ignored
within the automation hierarchy. The default value is false.
|
Returns
| IAutomationObject —
Nearest parent of the object visible within the automation
hierarchy.
|
public function getProperties(obj:IAutomationObject, names:Array = null, forVerification:Boolean = true, forDescription:Boolean = true):Array
Returns the values for a set of properties.
Parameters
| obj:IAutomationObject — Object for which to get the properties.
|
| |
| names:Array (default = null) — Names of the properties to evaluation on the object.
|
| |
| forVerification:Boolean (default = true) — If true, only include verification properties.
|
| |
| forDescription:Boolean (default = true) — If true, only include description properties.
|
Returns
| Array —
Array of objects that contain each property value and descriptor.
|
public function getRectangle(obj:DisplayObject):Array
The display rectangle enclosing the DisplayObject.
Parameters
Returns
| Array —
An array of four integers: top, left, width and height.
|
public function getTabularData(obj:IAutomationObject):IAutomationTabularData
Returns the object implementing the IAutomationTabularData interface through which
the tabular data can be obtained.
Parameters
Returns
public function incrementCacheCounter():int
Increments the cache counter. The automation mechanism
cache's both an object's properties and children. The cache
exists for both performance reasons, and so that an objects state
prior to a recording can be captured. Each call to the
incrementCacheCounter() method
increments a counter and each call to the
decrementCacheCounter() method
decrements the cache counter. When the counter reaches zero the
cache is cleared.
Its important that testing tools only use the
cache when they are certain that the state of the Flex application
is frozen and the user cannot interact with it. For example,
when an automation event is recorded, a testing tool may need to make
several calls to the getChildren() method or the
getProperties() method to create a testing
script line. To do this, it would wrap all the calls up in
start/stop cache calls.
The AutomationManager internally forcibly clears the cache
before an end-user interaction that may trigger an automation
event. It then increments the cache counter and decrements the
counter after the automation event is dispatched. Testing tools can
prevent the count from reaching zero by calling increment in their
record handler.
Returns
| int —
the current cache counter.
|
public function isSynchronized(target:IAutomationObject):Boolean
Tests if the provided target needs to wait until a previous
operation completes.
Parameters
| target:IAutomationObject — Target to check for synchronization or
null to synchronize on any running operations.
|
Returns
| Boolean —
true if synchronization is complete, false otherwise.
|
public function isVisible(obj:DisplayObject):Boolean
Returns true if an object and all of its parents are visible.
Parameters
Returns
| Boolean —
true if an object and all of its parents are visible.
|
public function recordAutomatableEvent(recorder:IAutomationObject, event:Event, cacheable:Boolean = false):void
Records the event.
Parameters
| recorder:IAutomationObject — The automation object on which the event is to be recorded.
|
| |
| event:Event — The actual event which needs to be recorded.
|
| |
| cacheable:Boolean (default = false) — Used to control the caching of the event that should be recorded.
During a mouse-down, mouse-up sequence, the automation mechanism tries to record the most
important or suitable event rather than all the events.
For example suppose you have a List control which has a button in its item renderer.
When the user clicks on the button, the automation mechanism only records
the click event for the button, but ignores the select event
generated from the List control.
|
public function replayAutomatableEvent(event:AutomationReplayEvent):Boolean
Replays the specified event. A component author should call
the super.replayAutomatableEvent() method
in case default replay behavior has been defined in a superclass.
Parameters
Returns
| Boolean —
true if the replay was successful.
|
public function resolveID(rid:AutomationID, currentParent:IAutomationObject = null):Array
Resolves an id to automation objects.
Parameters
| rid:AutomationID — Automation id of the automation object.
|
| |
| currentParent:IAutomationObject (default = null) — Current parent of the automation object.
|
Returns
| Array —
An Array containing all the objects matching the rid.
|
public function resolveIDPart(parent:IAutomationObject, part:AutomationIDPart):Array
Resolves an id part to an Array of automation objects.
Parameters
Returns
| Array —
Array of automation objects which match part.
|
public function resolveIDPartToSingleObject(parent:IAutomationObject, part:AutomationIDPart):IAutomationObject
Resolves an id part to an automation object within the parent.
Parameters
Returns
| IAutomationObject —
IAutomationObject which matches with the part.
If no object
is found or multiple objects are found, throw an exception.
|
public function resolveIDToSingleObject(rid:AutomationID, currentParent:IAutomationObject = null):IAutomationObject
Resolves an id to an automation object.
Parameters
| rid:AutomationID — Automation id of the automation object.
|
| |
| currentParent:IAutomationObject (default = null) — Current parent of the automation object.
|
Returns
| IAutomationObject —
IAutomationObject which matches with the rid.
If no object
is found or multiple objects are found, throw an exception.
|
public function showInHierarchy(obj:IAutomationObject):Boolean
Indicates whether an automation object should be visible within
the hierarchy.
Parameters
Returns
| Boolean —
true if the object should be shown within the
automation hierarchy.
|
© 2004-2006 Adobe Systems Incorporated. All rights reserved.
Fri Mar 16 2007, 2:46 PM GMT-07:00