com.hp.lft.sdk.ai

Class Relation

UFT Developer 2022 and later

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


    public class Relation
    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 relation with respect to other objects in the view.
    • Constructor Detail

      • Relation

        public Relation(RelationType relationType,
                        AiObject anchor)
        Constructs a new Relation that can be used to uniquely identify an AiObject by its visual relation.
        Parameters:
        relationType - the relation type with respect to the AiObject.
        anchor - the AiObject which has a visual relation with respect to the object to be identified.
    • Method Detail

      • setRelationType

        public void setRelationType(RelationType relationType)
        Sets the type of the Relation.
        Parameters:
        relationType - the type of the Relation.
      • getAnchor

        public AiObject getAnchor()
        Get the AiObject which has a visual relation with respect to the object to be identified.
        Returns:
        the AiObject which has a visual relation with respect to the object to be identified.
      • setAnchor

        public void setAnchor(AiObject anchor)
        Sets the AiObject which has a visual relation with respect to the object to be identified.
        Parameters:
        anchor - the AiObject which has a visual relation with respect to the object to be identified.
      • getProperties

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