Share this page

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

      public interface UiObjectBase
      extends WaitUntilEnabledProvider

  Common functionality for all UI objects in a mobile application.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAccessibilityId()` Returns the accessibility ID of the mobile object.
    `String` | `getClassName()` Returns the test object class name used by UFT Mobile.
    `String` | `getContainer()` Returns information about the table container, if the object is in a table.
    `String` | `getHint()` Returns the hint property of the mobile control.
    `Point` | `getLocation()` Returns the location of the mobile object.
    `int` | `getMobileCenterIndex()` Returns the ordinal number assigned to the object by UFT Mobile to indicate the order in which the object appears on the device relative to other objects with an otherwise identical description.
    `String` | `getNativeClass()` Returns the native class of the mobile object.
    `String` | `getResourceId()` Returns the resource ID of the control (Android only).
    `Dimension` | `getSize()` Returns size of the mobile object.
    `String` | `getText()` Returns the text of the mobile object.
    `boolean` | `isCheckable()` Indicates whether the mobile object can be checked.
    `boolean` | `isChecked()` Indicates whether the mobile object is checked (relevant for controls that can have a check mark).
    `boolean` | `isClickable()` Indicates whether the control can be tapped.
    `boolean` | `isFocusable()` Indicates whether the control can receive focus.
    `boolean` | `isFocused()` Indicates whether the mobile control is in focus.
    `void` | `longPress()` Presses and holds the object for a moment.
    `void` | `longPress(LongPressArgs args)` Presses and holds the object for a moment.
    `void` | `pan(Location start, Location end)` Perform a Pan gesture on the object.
    `void` | `pan(Point start, Point end)` Perform a Pan gesture on the object.
    `void` | `pan(Point start, Point end, PanArgs args)` Perform a Pan gesture on the object.
    `void` | `pinch(double scale)` Perform a Pinch gesture on the object.
    `void` | `pinch(double scale, PinchArgs args)` 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` | `tap(TapArgs args)` Taps the object.

    - ### Methods inherited from interface com.hp.lft.sdk.WaitUntilEnabledProvider

      `waitUntilEnabled, waitUntilEnabled`

    - ### Methods inherited from interface com.hp.lft.sdk.EnabledProvider

      `isEnabled`

- - ### Method Detail

    - #### getLocation

          Point getLocation()
                            throws GeneralLeanFtException

      Returns the location of the mobile object.
      Returns:
        the location of the mobile object.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### getSize

          Dimension getSize()
                            throws GeneralLeanFtException

      Returns size of the mobile object.
      Returns:
        size of the mobile object.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### getAccessibilityId

          String getAccessibilityId()
                                    throws GeneralLeanFtException

      Returns the accessibility ID of the mobile object.
      Returns:
        the accessibility ID of the mobile object.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### getClassName

          String getClassName()
                              throws GeneralLeanFtException

      Returns the test object class name used by UFT Mobile.
      Returns:
        the test object class name used by UFT Mobile.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### getContainer

          String getContainer()
                              throws GeneralLeanFtException

      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

          boolean isClickable()
                              throws GeneralLeanFtException

      Indicates whether the control can be tapped.
      Returns:
        true if the control can be tapped.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### isFocused

          boolean isFocused()
                            throws GeneralLeanFtException

      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

          boolean isFocusable()
                              throws GeneralLeanFtException

      Indicates whether the control can receive focus.
      Returns:
        true if the control can receive focus.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### getNativeClass

          String getNativeClass()
                                throws GeneralLeanFtException

      Returns the native class of the mobile object.
      Returns:
        the native class of the mobile object.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### getResourceId

          String getResourceId()
                               throws GeneralLeanFtException

      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

          String getHint()
                         throws GeneralLeanFtException

      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

          boolean isCheckable()
                              throws GeneralLeanFtException

      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

          boolean isChecked()
                            throws GeneralLeanFtException

      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

          int getMobileCenterIndex()
                                   throws GeneralLeanFtException

      Returns the ordinal number assigned to the object by UFT Mobile 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 UFT Mobile 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

          void tap()
                   throws GeneralLeanFtException

      Taps the object.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### tap

          void tap(TapArgs args)
                   throws GeneralLeanFtException

      Taps the object.
      Parameters:
        `args` - additional arguments for the tap operation.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### longPress

          void longPress()
                         throws GeneralLeanFtException

      Presses and holds the object for a moment.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution.

    - #### longPress

          void longPress(LongPressArgs args)
                         throws GeneralLeanFtException

      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

          void swipe(SwipeDirection direction)
                     throws GeneralLeanFtException

      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

          void swipe(SwipeDirection direction,
                   SwipeArgs args)
                     throws GeneralLeanFtException

      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

          void pan(Location start,
                 Location end)
                   throws GeneralLeanFtException

      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

          void pan(Point start,
                 Point end)
                   throws GeneralLeanFtException

      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

          void pan(Point start,
                 Point end,
                 PanArgs args)
                   throws GeneralLeanFtException

      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

          void pinch(double scale)
                     throws GeneralLeanFtException

      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

          void pinch(double scale,
                   PinchArgs args)
                     throws GeneralLeanFtException

      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

          String getText()
                         throws GeneralLeanFtException

      Returns the text of the mobile object.
      Returns:
        the text of the mobile object.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: