Interface UiObjectBase

All Superinterfaces:
Clickable, DoubleClickable, SupportSendKeys, TestObject, TestObjectDescriber, TopLevelObject
All Known Subinterfaces:
AppBar, Button, Calendar, CheckBox, ComboBox, Document, Edit, Grid, GridItem, Group, Header, HeaderItem, Image, Link, List, ListItem, Menu, MenuBar, MenuItem, Pane, ProgressBar, RadioButton, ScrollBar, SemanticZoom, Separator, Slider, Spinner, SplitButton, StatusBar, TabControl, TabItem, Table, Text, Thumb, TitleBar, ToolBar, ToolTip, TreeView, TreeViewItem, UiObject, Window

public interface UiObjectBase extends Clickable, DoubleClickable, SupportSendKeys, TopLevelObject
Base interface of all UIAPro test objects
  • Method Details

    • getX

      Returns:
      The object's x-coordinate (left) relative to the parent object (in pixels).
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getY

      Returns:
      The object's y-coordinate (top) relative to the parent object (in pixels).
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getAbsX

      Returns:
      The object's absolut x-coordinate (left) relative to the parent object (in pixels).
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getAbsY

      Returns:
      The object's absolute y-coordinate (top) relative to the parent object (in pixels).
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getWidth

      Integer getWidth() throws GeneralLeanFtException
      Returns:
      The object's width (in pixels).
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getHeight

      Integer getHeight() throws GeneralLeanFtException
      Returns:
      The object's height (in pixels).
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getProcessName

      String getProcessName() throws GeneralLeanFtException
      Returns:
      The UIAutomation object process name.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getProcessId

      Integer getProcessId() throws GeneralLeanFtException
      Returns:
      The UIAutomation object process id.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • hasKeyboardFocus

      Boolean hasKeyboardFocus() throws GeneralLeanFtException
      Returns:
      Indicates whether the object has keyboard focus.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getHandle

      int getHandle() throws GeneralLeanFtException
      Returns:
      The run-time object's window handle.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • isEnabled

      Boolean isEnabled() throws GeneralLeanFtException
      Returns:
      Indicates whether the object is enabled.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • isKeyboardFocusable

      Boolean isKeyboardFocusable() throws GeneralLeanFtException
      Returns:
      Indicates whether the object can accept keyboard focus.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • isOffScreen

      Boolean isOffScreen() throws GeneralLeanFtException
      Returns:
      Indicates whether the object is Offscreen.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • isPassword

      Boolean isPassword() throws GeneralLeanFtException
      Returns:
      Indicates whether the object contains protected content or a password.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getStatus

      String getStatus() throws GeneralLeanFtException
      Returns:
      Describes the status of the current object. For example,an item associated with a contact in a messaging application might be "Busy" or "Connected".
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getAcceleratorKey

      String getAcceleratorKey() throws GeneralLeanFtException
      Returns:
      The sequence of key combinations that invoke an action associated with the element.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getAccessKey

      String getAccessKey() throws GeneralLeanFtException
      Returns:
      The character that is used to activate the object.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getAutomationId

      String getAutomationId() throws GeneralLeanFtException
      Returns:
      The ID for an object that is unique among siblings within its container.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getControlType

      String getControlType() throws GeneralLeanFtException
      Returns:
      The UIAPro type for the object.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getFrameworkId

      String getFrameworkId() throws GeneralLeanFtException
      Returns:
      The name of the UI framework, such as Win32, WinForm, or DirectUI.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getSupportedPatterns

      List<String> getSupportedPatterns() throws GeneralLeanFtException
      Returns:
      The list of patterns supported for the test object.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getPath

      String getPath() throws GeneralLeanFtException
      Returns:
      The path in the application's object hierarchy, separated by semicolons, Objects in the path are represented by their name or automationId property values.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getNativeClass

      String getNativeClass() throws GeneralLeanFtException
      Returns:
      The class name assigned to the test object.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getName

      String getName() throws GeneralLeanFtException
      Returns:
      The name of the control.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getExpandCollapsePattern

      ExpandCollapsePattern getExpandCollapsePattern() throws GeneralLeanFtException
      Returns:
      The expand collapse pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getGridItemPattern

      GridItemPattern getGridItemPattern() throws GeneralLeanFtException
      Returns:
      The grid item pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getGridPattern

      GridPattern getGridPattern() throws GeneralLeanFtException
      Returns:
      The grid pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getInvokePattern

      InvokePattern getInvokePattern() throws GeneralLeanFtException
      Returns:
      The invoke pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getLegacyIAccessiblePattern

      LegacyIAccessiblePattern getLegacyIAccessiblePattern() throws GeneralLeanFtException
      Returns:
      The legacy accessible pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getRangeValuePattern

      RangeValuePattern getRangeValuePattern() throws GeneralLeanFtException
      Returns:
      The range value pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getScrollItemPattern

      ScrollItemPattern getScrollItemPattern() throws GeneralLeanFtException
      Returns:
      The scroll item pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getScrollPattern

      ScrollPattern getScrollPattern() throws GeneralLeanFtException
      Returns:
      The scroll pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getSelectionItemPattern

      SelectionItemPattern getSelectionItemPattern() throws GeneralLeanFtException
      Returns:
      The selection item pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getSelectionPattern

      SelectionPattern getSelectionPattern() throws GeneralLeanFtException
      Returns:
      The selection pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getTableItemPattern

      TableItemPattern getTableItemPattern() throws GeneralLeanFtException
      Returns:
      The table item pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getTablePattern

      TablePattern getTablePattern() throws GeneralLeanFtException
      Returns:
      The table pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getTextPattern

      TextPattern getTextPattern() throws GeneralLeanFtException
      Returns:
      The text pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getTogglePattern

      TogglePattern getTogglePattern() throws GeneralLeanFtException
      Returns:
      The toggle pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getValuePattern

      ValuePattern getValuePattern() throws GeneralLeanFtException
      Returns:
      The value pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getWindowPattern

      WindowPattern getWindowPattern() throws GeneralLeanFtException
      Returns:
      The window pattern, providing access to the relevant methods and properties.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getUIAAncestors

      <TAncestor extends UiObjectBase> TAncestor[] getUIAAncestors(Class<TAncestor> type, Description description, Integer minDepthLevel, Integer maxDepthLevel) throws GeneralLeanFtException, CloneNotSupportedException
      Type Parameters:
      TAncestor - The generic type of the ancestor test object.
      Parameters:
      type - The class type of the ancestor test object.
      description - A description containing the set of properties and values that should be common to all objects that are returned.
      minDepthLevel - The first level in the hierarchy, counting up from the object itself, from which to return ancestor objects. If specified, only ancestor objects from the specified level and upwards are returned.
      maxDepthLevel - The highest level in the hierarchy, counting up from the object itself, from which to return ancestor objects. If specified, only ancestor objects up to and including the specified level are returned.
      Returns:
      The collection of all the parent objects in the object's hierarchy that match the specified description, between the specified minimum and maximum depth levels. The object's immediate parent is level 1, its parent is level 2, and so on.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
      CloneNotSupportedException - if clone error occurs during execution.
    • getUIAAncestors

      UiObjectBase[] getUIAAncestors(Integer minDepthLevel, Integer maxDepthLevel) throws GeneralLeanFtException
      Parameters:
      minDepthLevel - The first level in the hierarchy, counting up from the object itself, from which to return ancestor objects. If specified, only ancestor objects from the specified level and upwards are returned.
      maxDepthLevel - The highest level in the hierarchy, counting up from the object itself, from which to return ancestor objects. If specified, only ancestor objects up to and including the specified level are returned.
      Returns:
      The collection of all the parent objects in the object's hierarchy, between the specified minimum and maximum depth levels. The object's immediate parent is level 1, its parent is level 2, and so on.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getUIAAncestors

      UiObjectBase[] getUIAAncestors() throws GeneralLeanFtException
      Returns:
      The collection of all the parent objects in the object's hierarchy, up to the root.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getUIAChildren

      <TChild extends UiObjectBase> TChild[] getUIAChildren(Class<TChild> type, Description description) throws GeneralLeanFtException, CloneNotSupportedException
      Type Parameters:
      TChild - The generic type of the child test object.
      Parameters:
      type - The class type of the child test object.
      description - A description containing the set of properties and values that should be common to all objects that are returned.
      Returns:
      The collection of immediate children contained within the object that match the specified description.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
      CloneNotSupportedException - if clone error occurs during execution.
    • getUIAChildren

      UiObjectBase[] getUIAChildren() throws GeneralLeanFtException
      Returns:
      The collection of immediate children contained within the object.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getUIADescendants

      <TDescendant extends UiObjectBase> TDescendant[] getUIADescendants(Class<TDescendant> type, Description description, Integer minDepthLevel, Integer maxDepthLevel) throws GeneralLeanFtException, CloneNotSupportedException
      Type Parameters:
      TDescendant - The generic type of the descendant test object.
      Parameters:
      type - The class type of the descendant test object.
      description - A description containing the set of properties and values that should be common to all objects that are returned.
      minDepthLevel - The first level in the hierarchy, counting down from the object itself, from which to return descendant objects. If specified, only descendant objects from the specified level and downwards are returned.
      maxDepthLevel - The lowest level in the hierarchy, counting down from the object itself, from which to return descendant objects. If specified, only descendant objects down to and including the specified level are returned.
      Returns:
      The collection of all the objects contained or nested beneath the object that match the specified description, between the specified minimum and maximum depth levels. The object's immediate children are level 1, their children are level 2, and so on.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
      CloneNotSupportedException - if clone error occurs during execution.
    • getUIADescendants

      UiObjectBase[] getUIADescendants(Integer minDepthLevel, Integer maxDepthLevel) throws GeneralLeanFtException
      Parameters:
      minDepthLevel - The first level in the hierarchy, counting down from the object itself, from which to return descendant objects. If specified, only descendant objects from the specified level and downwards are returned.
      maxDepthLevel - The lowest level in the hierarchy, counting down from the object itself, from which to return descendant objects. If specified, only descendant objects down to and including the specified level are returned.
      Returns:
      The collection of all the objects contained or nested beneath the object between the specified minimum and maximum depth levels. The object's immediate children are level 1, their children are level 2, and so on.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getUIADescendants

      UiObjectBase[] getUIADescendants() throws GeneralLeanFtException
      Returns:
      The collection of all the objects contained or nested beneath the object.
      Throws:
      GeneralLeanFtException - if error occurs during execution.
    • getUIAParent

      UiObjectBase getUIAParent() throws GeneralLeanFtException
      Returns:
      The object's immediate parent object. For the root object, which has no parent, null is returned.
      Throws:
      GeneralLeanFtException - if error occurs during execution.