Package com.hp.lft.sdk.mobile
Interface UiObjectBase
- All Superinterfaces:
EnabledProvider
,WaitUntilEnabledProvider
- All Known Subinterfaces:
Button
,Calendar
,CheckBox
,DropDown
,EditField
,Label
,Paginator
,RadioGroup
,RecyclerView
,Slider
,Stepper
,Table
,TabStrip
,Toggle
,UiObject
,View
,WebView
Common functionality for all UI objects in a mobile application.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the accessibility ID of the mobile object.Returns the test object class name used by OpenText Functional Testing Lab.Returns information about the table container, if the object is in a table.getHint()
Returns the hint property of the mobile control.Returns the location of the mobile object.int
Returns the ordinal number assigned to the object by OpenText Functional Testing Lab 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 object.Returns the resource ID of the control (Android only).getSize()
Returns size of the mobile object.getText()
Returns the text of the mobile object.boolean
Indicates whether the mobile object can be checked.boolean
Indicates whether the mobile object is checked (relevant for controls that can have a check mark).boolean
Indicates whether the control can be tapped.boolean
Indicates whether the control can receive focus.boolean
Indicates whether the mobile control is in focus.void
Presses and holds the object for a moment.void
longPress
(LongPressArgs args) Presses and holds the object for a moment.void
Perform a Pan gesture on the object.void
Perform a Pan gesture on the object.void
Perform a Pan gesture on the object.void
pinch
(double scale) Perform a Pinch gesture on the object.void
Perform a Pinch gesture on the object.void
swipe
(SwipeDirection direction) Swipes the object in the specified direction.void
swipe
(SwipeDirection direction, SwipeArgs args) Swipes the object in the specified direction.void
tap()
Taps the object.void
Taps the object.Methods inherited from interface com.hp.lft.sdk.EnabledProvider
isEnabled
Methods inherited from interface com.hp.lft.sdk.WaitUntilEnabledProvider
waitUntilEnabled, waitUntilEnabled
-
Method Details
-
getLocation
Returns the location of the mobile object.- Returns:
- the location of the mobile object.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
getSize
Returns size of the mobile object.- Returns:
- size of the mobile object.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
getAccessibilityId
Returns the accessibility ID of the mobile object.- Returns:
- the accessibility ID of the mobile object.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
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.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
getContainer
Returns information about the table container, if the object is in a table. (iOS Only).- Returns:
- information about the table container, if the object is in a table.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
isClickable
Indicates whether the control can be tapped.- Returns:
- true if the control can be tapped.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
isFocused
Indicates whether the mobile control is in focus.- Returns:
- true if the mobile control is in focus.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
isFocusable
Indicates whether the control can receive focus.- Returns:
- true if the control can receive focus.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
getNativeClass
Returns the native class of the mobile object.- Returns:
- the native class of the mobile object.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
getResourceId
Returns the resource ID of the control (Android only).- Returns:
- the resource ID of the control (Android only).
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
getHint
Returns the hint property of the mobile control. The hint is an instruction or an example indicating the type of content to enter for the value of a control, for example, a grayed out hint inside a text box.- Returns:
- the hint property of the mobile control.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
isCheckable
Indicates whether the mobile object can be checked.- Returns:
- true if the mobile object can be checked.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
isChecked
Indicates whether the mobile object is checked (relevant for controls that can have a check mark).- Returns:
- true if the mobile object is checked (relevant for controls that can have a check mark).
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
getMobileCenterIndex
Returns the ordinal number assigned to the object by OpenText Functional Testing Lab 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 by OpenText Functional Testing Lab to indicate the order in which the object appears on the device relative to other objects with an otherwise identical description.
- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
tap
Taps the object.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
tap
Taps the object.- Parameters:
args
- additional arguments for the tap operation.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
longPress
Presses and holds the object for a moment.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
longPress
Presses and holds the object for a moment.- Parameters:
args
- additional arguments for the long press operation.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
swipe
Swipes the object in the specified direction.- Parameters:
direction
- the direction in which to swipe the device.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
swipe
Swipes the object in the specified direction.- Parameters:
direction
- the direction in which to swipe the device.args
- additional arguments for the swipe operation.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
pan
Perform a Pan gesture on the object.- Parameters:
start
- the location at which to start the pan gesture.end
- the location at which to end the pan gesture.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
pan
Perform a Pan gesture on the object.- Parameters:
start
- the location at which to start the pan gesture.end
- the location at which to end the pan gesture.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
pan
Perform a Pan gesture on the object.- Parameters:
start
- the location at which to start the pan gesture.end
- the location at which to end the pan gesture.args
- additional arguments for the pan operation.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
pinch
Perform a Pinch gesture on the object.- Parameters:
scale
- The scale for the pinch gesture. This number is the ratio between the start distance and the end distance between the two touch point used for the pinch.
For example, if you were to touch a screen with your fingers 6 cm apart, and pinch until your fingers were 3 cm, apart, the scale would be 0.5.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
pinch
Perform a Pinch gesture on the object.- Parameters:
scale
- The scale for the pinch gesture. This number is the ratio between the start distance and the end distance between the two touch point used for the pinch.
For example, if you were to touch a screen with your fingers 6 cm apart, and pinch until your fingers were 3 cm, apart, the scale would be 0.5.args
- additional arguments for the pinch operation.- Throws:
GeneralLeanFtException
- if error occurs during execution.
-
getText
Returns the text of the mobile object.- Returns:
- the text of the mobile object.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-