com.hp.lft.sdk.ai

Class Position

  • All Implemented Interfaces:
    Locator, com.hp.lft.sdk.internal.GroupedProperty


    public class Position
    extends Object
    implements Locator, com.hp.lft.sdk.internal.GroupedProperty
    This Locator helps distinguish an AiObject that may appear multiple times in the application by its position.
    • Constructor Detail

      • Position

        public Position(Direction direction,
                        int index)
        Constructs a new Position that can be used to uniquely identify an AiObject by it's position.
        Parameters:
        direction - the direction in which to count the position index.
        index - The ordinal number of the object in the context. Starting with 0 for the first object. UFT Developer counts the objects that match the description, in the direction specified.
    • Method Detail

      • getDirection

        public Direction getDirection()
        Returns the direction of the AiObject's position.
        Returns:
        the direction of the AiObject's position.
      • setDirection

        public void setDirection(Direction direction)
        Sets the direction of the AiObject's position.
        Parameters:
        direction - the direction of the AiObject's position.
      • getIndex

        public int getIndex()
        Returns the 0-based index of the AiObject's position.
        Returns:
        the 0-based index of the AiObject's position.
      • setIndex

        public void setIndex(int index)
        Sets the 0-based index of the AiObject's position.
        Parameters:
        index - the 0-based index of the AiObject's position.
      • getProperties

        public Map<String,Object> getProperties()
        Specified by:
        getProperties in interface com.hp.lft.sdk.internal.GroupedProperty