ActionScript® 3.0 — dokumentacja dla platformy Adobe® Flash®
Strona główna  |  Ukryj listę pakietów i klas |  Pakiety  |  Klasy  |  Nowości  |  Indeks  |  Dodatki  |  Dlaczego język angielski?
Filtry: Pobieranie danych z serwera...
Pobieranie danych z serwera...
mx.automation 

AutomationID  - AS3 Flex

Pakietmx.automation
Klasapublic class AutomationID
DziedziczenieAutomationID Inheritance Object

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The Flex automation framework uses the AutomationID class to build object identification that Agents can use. AutomationID consists of many AutomationIDParts, where each part identifies an object in the hierarchy. AutomationID defines a serialization format for an Array of maps. You use this class to represent a hierarchy using segments that describe the properties of each object within the hierarchy. The serialize format of the id is:
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.



Właściwości publiczne
 WłaściwośćZdefiniowane przez
 Inheritedconstructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu.
Object
  length : int
[tylko do odczytu] The number of parts in this id.
AutomationID
Metody publiczne
 MetodaZdefiniowane przez
  
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
 Inherited
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość.
Object
  
Indicates if there are more parts of the id.
AutomationID
 Inherited
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr.
Object
  
[statyczny] Parses the string and returns an id.
AutomationID
  
Returns the first object in the id
AutomationID
  
Returns the last object in the id.
AutomationID
 Inherited
Wskazuje, czy określona właściwość istnieje i jest przeliczalna.
Object
  
Removes the first object from this id.
AutomationID
  
Removes the last object from this id.
AutomationID
 Inherited
Ustawia dostępność właściwości dynamicznej używanej w pętlach.
Object
 Inherited
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych.
Object
  
Serializes the id to a string.
AutomationID
 Inherited
Zwraca pierwotną wartość dla określonego obiektu.
Object
Szczegół właściwości

length

właściwość
length:int  [tylko do odczytu]

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The number of parts in this id.



Implementacja
    public function get length():int
Konstruktor Szczegół

AutomationID

()Konstruktor
public function AutomationID()

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Constructor.

Szczegół metody

addFirst

()metoda
public function addFirst(p:AutomationIDPart):void

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Adds a parts to the front of the id.

Parametry

p:AutomationIDPart — Map of properties.

addLast

()metoda 
public function addLast(p:AutomationIDPart):void

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Adds a parts to the end of the id.

Parametry

p:AutomationIDPart — Map of properties.

concat

()metoda 
public function concat(other:AutomationID):AutomationID

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Concatenates another id to this id. Returns a new id, and does not mutate this instance.

Parametry

other:AutomationID — id to concatenate.

Zwraca
AutomationID — This id concatenated with the other id.

equals

()metoda 
public function equals(other:AutomationID):Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Compares this object with the given AutomationID.

Parametry

other:AutomationID — AutomationID object which needs to be compared.

Zwraca
Booleantrue if they are equal, false otherwise.

isEmpty

()metoda 
public function isEmpty():Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Indicates if there are more parts of the id.

Zwraca
Booleantrue if there are no more parts of the id, false otherwise.

parse

()metoda 
public static function parse(s:String):AutomationID

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Parses the string and returns an id.

Parametry

s:String — Serialized form of the id as provided by the toString() method.

Zwraca
AutomationID — Parsed id.

peekFirst

()metoda 
public function peekFirst():AutomationIDPart

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Returns the first object in the id

Zwraca
AutomationIDPart — First object in the id.

peekLast

()metoda 
public function peekLast():AutomationIDPart

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Returns the last object in the id.

Zwraca
AutomationIDPart — Last object in the id.

removeFirst

()metoda 
public function removeFirst():AutomationIDPart

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Removes the first object from this id.

Zwraca
AutomationIDPart — First object in this id.

removeLast

()metoda 
public function removeLast():AutomationIDPart

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Removes the last object from this id.

Zwraca
AutomationIDPart — Last object in this id.

toString

()metoda 
public function toString():String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 3
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Serializes the id to a string.

Zwraca
String — The serialized id.




[ X ]Dlaczego język angielski?
Treść dokumentacji języka ActionScript 3.0 wyświetlana w języku angielskim

Niektóre części dokumentacji języka ActionScript 3.0 nie są przetłumaczone na poszczególne języki. Gdy element nie jest przetłumaczony na dany język, jest wyświetlany tekst angielski. Na przykład opis klasy ga.controls.HelpBox nie jest przetłumaczony na żaden dodatkowy język. Z tego powodu polska wersja dokumentacji zawiera opis klasy ga.controls.HelpBox w języku angielskim.