Paket | mx.automation |
Klass | public class AutomationID |
Arv | AutomationID Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
property_1_name{property_1_value property_1_type}property_2_name{property_2_value property_2_type}|property_1_name{property_1_value property_1_type}property_2_name{property_2_value property_2_type}
Consider a Flex application with following hierarchy:
Application -- > Accordion -- > HBox -- > Button
The AutomationID of the button would consist of four AutomationIDParts, one for application, one for Accordion, one for HBox, and one for the Button. AutomationIDPart is a table of property names and their values. The property-value pairs are different for different object types. These property-value pairs should be usable to identify the object uniquely.
AutomationID is created by walking the parent hierarchy of the leaf child object and creating
the AutomationIDPart for each object encountered. Parents that have
showInAutomationHierarchy
set to false
are skipped. Children of such
parents are considered the children of the next higher
parent whose showInAuto
flag is set to true
. During recording,
this AutomationID can be saved by the agent.
During playback when Agent provides AutomationID for finding an object, the Display object
hierarchy is walked from the top Application object downwards. At each level, a child that
matches the AutomationIDPart closest is picked up from the list of all the children. If
multiple children match the criteria, an error is thrown. Users are responsible to resolve
such conflicts by providing a unique automationName
or identifying new properties on
objects which make them unique.
Agents should save the object information if they desire persistence. AutomationID provides
toString()
and parse()
methods to convert the object to a
string representation and back.
You can use the IAutomationManager.createAutomationID()
and
IAutomationManager.resolveAutomationID()
methods
to create and resolve AutomationID objects, respectively.
You can use the IAutomationObjectHelper.helpCreateIDPart()
and IAutomationObjectHelper.helpResolveIDPart()
methods
to identify a child with in a parent which matches the AutomationIDPart.
Fler exempel
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
length : int [skrivskyddad]
The number of parts in this id. | AutomationID |
Metod | Definieras med | ||
---|---|---|---|
Constructor. | AutomationID | ||
Adds a parts to the front of the id. | AutomationID | ||
Adds a parts to the end of the id. | AutomationID | ||
Concatenates another id to this id. | AutomationID | ||
Compares this object with the given AutomationID. | AutomationID | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Indicates if there are more parts of the id. | AutomationID | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
[statisk]
Parses the string and returns an id. | AutomationID | ||
Returns the first object in the id
| AutomationID | ||
Returns the last object in the id. | AutomationID | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Removes the first object from this id. | AutomationID | ||
Removes the last object from this id. | AutomationID | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Serializes the id to a string. | AutomationID | ||
Returnerar det angivna objektets primitiva värde. | Object |
length | egenskap |
AutomationID | () | Konstruktor |
public function AutomationID()
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Constructor.
addFirst | () | metod |
public function addFirst(p:AutomationIDPart):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Adds a parts to the front of the id.
Parametrar
p:AutomationIDPart — Map of properties.
|
addLast | () | metod |
public function addLast(p:AutomationIDPart):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Adds a parts to the end of the id.
Parametrar
p:AutomationIDPart — Map of properties.
|
concat | () | metod |
public function concat(other:AutomationID):AutomationID
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Concatenates another id to this id. Returns a new id, and does not mutate this instance.
Parametrar
other:AutomationID — id to concatenate.
|
AutomationID — This id concatenated with the other id.
|
equals | () | metod |
public function equals(other:AutomationID):Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Compares this object with the given AutomationID.
Parametrar
other:AutomationID — AutomationID object which needs to be compared.
|
Boolean — true if they are equal, false otherwise.
|
isEmpty | () | metod |
parse | () | metod |
public static function parse(s:String):AutomationID
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Parses the string and returns an id.
Parametrar
s:String — Serialized form of the id as provided by the toString() method.
|
AutomationID — Parsed id.
|
peekFirst | () | metod |
public function peekFirst():AutomationIDPart
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Returns the first object in the id
ReturnerarAutomationIDPart — First object in the id.
|
peekLast | () | metod |
public function peekLast():AutomationIDPart
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Returns the last object in the id.
ReturnerarAutomationIDPart — Last object in the id.
|
removeFirst | () | metod |
public function removeFirst():AutomationIDPart
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Removes the first object from this id.
ReturnerarAutomationIDPart — First object in this id.
|
removeLast | () | metod |
public function removeLast():AutomationIDPart
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Removes the last object from this id.
ReturnerarAutomationIDPart — Last object in this id.
|
toString | () | metod |
Tue Jun 12 2018, 01:40 PM Z