Package com.hp.lft.sdk.mobile
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Helper class for derived Builder classes. -
Field Summary
Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase
properties
-
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs a new instance of UiObjectDescriptionBase.protected
Initializes a new instance of the UiObjectBaseDescription class using the Builder pattern. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates an exact copy of the test object with its description.Returns the accessibility ID of the mobile object.Returns the test object class name used by OpenText Functional Testing Lab.Returns the table container,if the object is in a table.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 native class of the mobile control.Returns the concrete test object properties, including custom properties created by the developer of the control.Returns the resource ID of the object.getText()
Returns text of the mobile object.getVRI()
Returns the VisualRelation definition.Indicates whether the mobile object can be checked.Indicates whether the mobile object is checked.Indicates whether the control can be tapped.Indicates whether the object is enabled.Indicates whether the control can receive focus.Indicates whether the mobile control is in focus.void
setAccessibilityId
(StringProperty accessibilityId) Sets the accessibility ID of the mobile object.void
setAccessibilityId
(String accessibilityId) Sets the accessibility ID of the mobile object.void
setCheckable
(Boolean isCheckable) Sets whether the mobile object can be checked.void
setChecked
(Boolean isChecked) Sets whether the mobile object is checked.void
setClassName
(String className) Sets the test object class name used by OpenText Functional Testing Lab.void
setClickable
(Boolean isClickable) Sets whether the control can be tapped.void
setContainer
(String container) Sets the table container, if the object is in a table.void
setEnabled
(Boolean isEnabled) Sets whether the object is enabled.void
setFocusable
(Boolean isFocusable) Sets whether the control can receive focus.void
setFocused
(Boolean isFocused) Sets whether the mobile control is in focus.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.void
setNativeClass
(StringProperty nativeClass) Sets the native class of the mobile control.void
setNativeClass
(String nativeClass) Sets the native class of the mobile control.void
setObjectProperties
(Map<String, Object> objectProperties) Sets the test object properties, including custom properties of a custom control.void
setResourceId
(StringProperty resourceId) Sets the resource ID of the object.void
setResourceId
(String resourceId) Sets the resource ID of the object.void
setText
(StringProperty text) Sets text of the mobile object.void
Sets text of the mobile object.void
setVRI
(VisualRelation... vriRelations) Sets a VisualRelation definition.void
setVRI
(List<VisualRelation> visualRelations) Sets a VisualRelation definition.Methods inherited from class com.hp.lft.sdk.PropertiesDescription
clone
Methods inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase
getValueAs, getValueAsStringProperty, insertValue
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.hp.lft.sdk.CloneableObject
clone
-
Constructor Details
-
UiObjectBaseDescription
public UiObjectBaseDescription()Constructs a new instance of UiObjectDescriptionBase. -
UiObjectBaseDescription
Initializes a new instance of the UiObjectBaseDescription class using the Builder pattern.- Parameters:
init
- the Builder pattern.
-
-
Method Details
-
setAccessibilityId
Sets the accessibility ID of the mobile object.- Parameters:
accessibilityId
- the accessibility ID of the mobile object.
-
setAccessibilityId
Sets the accessibility ID of the mobile object.- Parameters:
accessibilityId
- a StringProperty (or RegExpProperty) representing the accessibility ID of the mobile object.
-
getAccessibilityId
Returns the accessibility ID of the mobile object.- Returns:
- the accessibility ID of the mobile object.
-
setClassName
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
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
Sets the table container, if the object is in a table. (iOS Only)- Parameters:
container
- the table container. (iOS Only)
-
getContainer
Returns the table container,if the object is in a table. (iOS Only)- Returns:
- the table container.
-
setResourceId
Sets the resource ID of the object. (Android Only)- Parameters:
resourceId
- the resource ID of the object. (Android Only)
-
setResourceId
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
Returns the resource ID of the object. (Android Only)- Returns:
- the resource ID of the object. (Android Only)
-
setMobileCenterIndex
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
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
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 interfacecom.hp.lft.sdk.internal.DescriptionWithVri
- Returns:
- a
VisualRelation
object containing the VRI definition for this object.
-
setVRI
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 interfacecom.hp.lft.sdk.internal.DescriptionWithVri
- Parameters:
visualRelations
- theVisualRelation
object containing the VRI definition for this object.
-
setVRI
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 interfacecom.hp.lft.sdk.internal.DescriptionWithVri
- Parameters:
vriRelations
- theVisualRelation
object containing the VRI definition for this object.
-
setNativeClass
Sets the native class of the mobile control.- Parameters:
nativeClass
- the native class of the mobile control.
-
setNativeClass
Sets the native class of the mobile control.- Parameters:
nativeClass
- aStringProperty
orRegExpProperty
representing the native class of the mobile control.
-
getNativeClass
Returns the native class of the mobile control.- Returns:
- the native class of the mobile control.
-
setEnabled
Sets whether the object is enabled.- Parameters:
isEnabled
- true if enabled.
-
isEnabled
Indicates whether the object is enabled.- Returns:
- true if enabled.
-
setClickable
Sets whether the control can be tapped.- Parameters:
isClickable
- true if has the control can be tapped.
-
isClickable
Indicates whether the control can be tapped.- Returns:
- true if has the control can be tapped.
-
setFocusable
Sets whether the control can receive focus.- Parameters:
isFocusable
- true if has the control can receive focus.
-
isFocusable
Indicates whether the control can receive focus.- Returns:
- true if has the control can receive focus.
-
setFocused
Sets whether the mobile control is in focus.- Parameters:
isFocused
- true if has the mobile control is in focus.
-
isFocused
Indicates whether the mobile control is in focus.- Returns:
- true if has the mobile control is in focus.
-
cloneTo
Creates an exact copy of the test object with its description.- Overrides:
cloneTo
in classcom.hp.lft.sdk.internal.PropertiesDescriptionBase
- Throws:
CloneNotSupportedException
-
setText
Sets text of the mobile object.- Parameters:
text
- the text of the mobile object.
-
setText
Sets text of the mobile object.- Parameters:
text
- a StringProperty (or RegExpProperty) representing text of the mobile object.
-
getText
Returns text of the mobile object.- Returns:
- text of the mobile object.
-
setCheckable
Sets whether the mobile object can be checked.- Parameters:
isCheckable
- true if the mobile object can be checked.
-
isCheckable
Indicates whether the mobile object can be checked.- Returns:
- true if the object can be checked.
-
setChecked
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
Indicates whether the mobile object is checked.- Returns:
- true if the mobile object is checked.
-
setObjectProperties
Sets the test object properties, including custom properties of a custom control.- Parameters:
objectProperties
- the test object properties
-
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.
-