net.sf.jzeno.echo.script
Interface Identifier

All Known Implementing Classes:
AbstractIdentifier, ComposedPropertyPathIdentifier, LabelIdentifier, MockIdentifier, PositionFromNearestPropertyComponent, PositionIdentifier, StateIdentifier, TextIdentifier, TypeCountIdentifier, UniqueEventSourceIdentifier, UniquePropertyComponentIdentifier

public interface Identifier

Identifiers are responsible for creating a more robust, and abstract 'label' of components in the component tree. If a certain identifier is not able to find a UNIQUE representation of a component it should return null. If an identifier is not able to translate a label back into the corresponding UNIQUE component in the component tree, it should return null. A higher level IdentificationManager will execute multiple of these identification strategies an will most likely be able to retrieve the exact component from the component tree, even if certain aspects of that component tree have been modified since recording a test script. (e.g. moving of components, changing binding, changing label on button, etc..)

The identification strings returned should not include the '|', or '=' character as that is used to concatenate/split a group of multiple labels.

An identifier is in essence a heuristic for identification that will be working together with a number of other heuristics that together provide a resilient identification of a component.


Method Summary
 java.util.List getComponent(java.lang.String label)
           Retrieve the (unique) component that is identified by the given label.
 java.lang.String getLabel(Component c)
           Create a string representation (called a label) of a given component according to this identifier's strategy.
 

Method Detail

getLabel

java.lang.String getLabel(Component c)

Create a string representation (called a label) of a given component according to this identifier's strategy. Do not use the '|' character in the generated string, as it is used to seperate multiple labels of different identifier strategies.

This method should return null if it was unable to create a label for the given component

Parameters:
c -
Returns:

getComponent

java.util.List getComponent(java.lang.String label)

Retrieve the (unique) component that is identified by the given label.

Should return null if it was unable to retrieve the component

Parameters:
label -
Returns: