Class UiObjectBaseDescription

java.lang.Object
com.hp.lft.sdk.internal.PropertiesDescriptionBase
com.hp.lft.sdk.PropertiesDescription
com.hp.lft.sdk.mobile.UiObjectBaseDescription
All Implemented Interfaces:
CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, Cloneable
Direct Known Subclasses:
ButtonDescription, CalendarDescription, CheckBoxDescription, DropDownDescription, EditFieldDescription, LabelDescription, PaginatorDescription, RadioGroupDescription, RecyclerViewDescription, SliderDescription, StepperDescription, TableDescription, TabStripDescription, ToggleDescription, UiObjectDescription, ViewDescription, WebViewDescription

public class UiObjectBaseDescription extends PropertiesDescription implements com.hp.lft.sdk.internal.DescriptionWithVri
The base description of all test objects in a mobile application.
  • Constructor Details

    • UiObjectBaseDescription

      public UiObjectBaseDescription()
      Constructs a new instance of UiObjectDescriptionBase.
    • UiObjectBaseDescription

      protected UiObjectBaseDescription(UiObjectBaseDescription.Init<?> init)
      Initializes a new instance of the UiObjectBaseDescription class using the Builder pattern.
      Parameters:
      init - the Builder pattern.
  • Method Details

    • setAccessibilityId

      public void setAccessibilityId(String accessibilityId)
      Sets the accessibility ID of the mobile object.
      Parameters:
      accessibilityId - the accessibility ID of the mobile object.
    • setAccessibilityId

      public void setAccessibilityId(StringProperty accessibilityId)
      Sets the accessibility ID of the mobile object.
      Parameters:
      accessibilityId - a StringProperty (or RegExpProperty) representing the accessibility ID of the mobile object.
    • getAccessibilityId

      public StringProperty getAccessibilityId()
      Returns the accessibility ID of the mobile object.
      Returns:
      the accessibility ID of the mobile object.
    • setClassName

      public void setClassName(String className)
      Sets the test object class name used by OpenText Functional Testing Lab.
      Parameters:
      className - the test object class name used by OpenText Functional Testing Lab.
    • getClassName

      public String getClassName()
      Returns the test object class name used by OpenText Functional Testing Lab.
      Returns:
      the test object class name used by OpenText Functional Testing Lab.
    • setContainer

      public void setContainer(String container)
      Sets the table container, if the object is in a table. (iOS Only)
      Parameters:
      container - the table container. (iOS Only)
    • getContainer

      public String getContainer()
      Returns the table container,if the object is in a table. (iOS Only)
      Returns:
      the table container.
    • setResourceId

      public void setResourceId(String resourceId)
      Sets the resource ID of the object. (Android Only)
      Parameters:
      resourceId - the resource ID of the object. (Android Only)
    • setResourceId

      public void setResourceId(StringProperty resourceId)
      Sets the resource ID of the object. (Android Only)
      Parameters:
      resourceId - a StringProperty (or RegExpProperty) representing the resource ID of the object. (Android Only)
    • getResourceId

      public StringProperty getResourceId()
      Returns the resource ID of the object. (Android Only)
      Returns:
      the resource ID of the object. (Android Only)
    • setMobileCenterIndex

      public void setMobileCenterIndex(Integer mobileCenterIndex)
      Sets the ordinal number assigned to the object to indicate the order in which the object appears on the device relative to other objects with an otherwise identical description.
      Parameters:
      mobileCenterIndex - the ordinal number assigned to the object.
    • getMobileCenterIndex

      public Integer getMobileCenterIndex()
      Returns the ordinal number assigned to the object to indicate the order in which the object appears on the device relative to other objects with an otherwise identical description.
      Returns:
      the ordinal number assigned to the object.
    • getVRI

      public List<VisualRelation> getVRI()
      Returns the VisualRelation definition.
      The VRI definition helps to distinguish this object from other objects with otherwise identical descriptions, based on this object's visual relationship to another object in the application.
      Specified by:
      getVRI in interface com.hp.lft.sdk.internal.DescriptionWithVri
      Returns:
      a VisualRelation object containing the VRI definition for this object.
    • setVRI

      public void setVRI(List<VisualRelation> visualRelations)
      Sets a VisualRelation definition.
      The VRI definition helps to distinguish this object from other objects with otherwise identical descriptions, based on this object's visual relationship to another object in the application.
      Specified by:
      setVRI in interface com.hp.lft.sdk.internal.DescriptionWithVri
      Parameters:
      visualRelations - the VisualRelation object containing the VRI definition for this object.
    • setVRI

      public void setVRI(VisualRelation... vriRelations)
      Sets a VisualRelation definition.
      The VRI definition helps to distinguish this object from other objects with otherwise identical descriptions, based on this object's visual relationship to another object in the application.
      Specified by:
      setVRI in interface com.hp.lft.sdk.internal.DescriptionWithVri
      Parameters:
      vriRelations - the VisualRelation object containing the VRI definition for this object.
    • setNativeClass

      public void setNativeClass(String nativeClass)
      Sets the native class of the mobile control.
      Parameters:
      nativeClass - the native class of the mobile control.
    • setNativeClass

      public void setNativeClass(StringProperty nativeClass)
      Sets the native class of the mobile control.
      Parameters:
      nativeClass - a StringProperty or RegExpProperty representing the native class of the mobile control.
    • getNativeClass

      public StringProperty getNativeClass()
      Returns the native class of the mobile control.
      Returns:
      the native class of the mobile control.
    • setEnabled

      public void setEnabled(Boolean isEnabled)
      Sets whether the object is enabled.
      Parameters:
      isEnabled - true if enabled.
    • isEnabled

      public Boolean isEnabled()
      Indicates whether the object is enabled.
      Returns:
      true if enabled.
    • setClickable

      public void setClickable(Boolean isClickable)
      Sets whether the control can be tapped.
      Parameters:
      isClickable - true if has the control can be tapped.
    • isClickable

      public Boolean isClickable()
      Indicates whether the control can be tapped.
      Returns:
      true if has the control can be tapped.
    • setFocusable

      public void setFocusable(Boolean isFocusable)
      Sets whether the control can receive focus.
      Parameters:
      isFocusable - true if has the control can receive focus.
    • isFocusable

      public Boolean isFocusable()
      Indicates whether the control can receive focus.
      Returns:
      true if has the control can receive focus.
    • setFocused

      public void setFocused(Boolean isFocused)
      Sets whether the mobile control is in focus.
      Parameters:
      isFocused - true if has the mobile control is in focus.
    • isFocused

      public Boolean isFocused()
      Indicates whether the mobile control is in focus.
      Returns:
      true if has the mobile control is in focus.
    • cloneTo

      protected void cloneTo(Object clonedObject) throws CloneNotSupportedException
      Creates an exact copy of the test object with its description.
      Overrides:
      cloneTo in class com.hp.lft.sdk.internal.PropertiesDescriptionBase
      Throws:
      CloneNotSupportedException
    • setText

      public void setText(String text)
      Sets text of the mobile object.
      Parameters:
      text - the text of the mobile object.
    • setText

      public void setText(StringProperty text)
      Sets text of the mobile object.
      Parameters:
      text - a StringProperty (or RegExpProperty) representing text of the mobile object.
    • getText

      public StringProperty getText()
      Returns text of the mobile object.
      Returns:
      text of the mobile object.
    • setCheckable

      public void setCheckable(Boolean isCheckable)
      Sets whether the mobile object can be checked.
      Parameters:
      isCheckable - true if the mobile object can be checked.
    • isCheckable

      public Boolean isCheckable()
      Indicates whether the mobile object can be checked.
      Returns:
      true if the object can be checked.
    • setChecked

      public void setChecked(Boolean isChecked)
      Sets whether the mobile object is checked. (Relevant for objects that can have a check mark.)
      Parameters:
      isChecked - true to mark the mobile object as checked.
    • isChecked

      public Boolean isChecked()
      Indicates whether the mobile object is checked.
      Returns:
      true if the mobile object is checked.
    • setObjectProperties

      public void setObjectProperties(Map<String,Object> objectProperties)
      Sets the test object properties, including custom properties of a custom control.
      Parameters:
      objectProperties - the test object properties
    • getObjectProperties

      public Map<String,Object> getObjectProperties()
      Returns the concrete test object properties, including custom properties created by the developer of the control.
      Returns:
      the concrete test object properties, including custom properties created by the developer of the control.