Table of Contents

Interface IUiObjectBase

Base interface for all UIAPro test objects.

Namespace: HP.LFT.SDK.UIAPro
Assembly: HP.LFT.SDK.dll
Syntax
public interface IUiObjectBase : IClickable, IDoubleClickable, ISupportSendKeys, ITopLevelObject, ITestObject, ITestObjectDescriber

Properties

AbsX

The object's absolut x-coordinate (left) relative to the parent object (in pixels).

Declaration
int AbsX { get; }
Property Value
Type Description
int

AbsY

The object's absolute y-coordinate (top) relative to the parent object (in pixels).

Declaration
int AbsY { get; }
Property Value
Type Description
int

AcceleratorKey

The sequence of key combinations that invoke an action associated with the element.

Declaration
string AcceleratorKey { get; }
Property Value
Type Description
string

AccessKey

The character that is used to activate the object.

Declaration
string AccessKey { get; }
Property Value
Type Description
string

AutomationId

The ID for an object that is unique among siblings within its container.

Declaration
string AutomationId { get; }
Property Value
Type Description
string

ControlType

The UIAPro type for the object.

Declaration
string ControlType { get; }
Property Value
Type Description
string

ExpandCollapsePattern

The expand collapse pattern, providing access to the relevant methods and properties.

Declaration
IExpandCollapsePattern ExpandCollapsePattern { get; }
Property Value
Type Description
IExpandCollapsePattern

FrameworkId

The name of the UI framework, such as Win32, WinForm, or DirectUI.

Declaration
string FrameworkId { get; }
Property Value
Type Description
string

GridItemPattern

The grid item pattern, providing access to the relevant methods and properties.

Declaration
IGridItemPattern GridItemPattern { get; }
Property Value
Type Description
IGridItemPattern

GridPattern

The grid pattern, providing access to the relevant methods and properties.

Declaration
IGridPattern GridPattern { get; }
Property Value
Type Description
IGridPattern

Handle

The run-time object's window handle.

Declaration
int Handle { get; }
Property Value
Type Description
int

HasKeyBoardFocus

Indicates whether the object has keyboard focus.

Declaration
bool HasKeyBoardFocus { get; }
Property Value
Type Description
bool

Height

The object's height (in pixels).

Declaration
int Height { get; }
Property Value
Type Description
int

InvokePattern

The invoke pattern, providing access to the relevant methods and properties.

Declaration
IInvokePattern InvokePattern { get; }
Property Value
Type Description
IInvokePattern

IsEnabled

Indicates whether the object is enabled.

Declaration
bool IsEnabled { get; }
Property Value
Type Description
bool

IsKeyboardFocusable

Indicates whether the object can accept keyboard focus.

Declaration
bool IsKeyboardFocusable { get; }
Property Value
Type Description
bool

IsOffScreen

Indicates whether the object is Offscreen.

Declaration
bool IsOffScreen { get; }
Property Value
Type Description
bool

IsPassword

Indicates whether the object contains protected content or a password.

Declaration
bool IsPassword { get; }
Property Value
Type Description
bool

LegacyIAccessiblePattern

The legacy accessible pattern, providing access to the relevant methods and properties.

Declaration
ILegacyIAccessiblePattern LegacyIAccessiblePattern { get; }
Property Value
Type Description
ILegacyIAccessiblePattern

Name

The name of the control.

Declaration
string Name { get; }
Property Value
Type Description
string

NativeClass

The class name assigned to the test object.

Declaration
string NativeClass { get; }
Property Value
Type Description
string

Path

The path in the application's object hierarchy, separated by semicolons. Objects in the path are represented by their name or automationId property values.

Declaration
string Path { get; }
Property Value
Type Description
string

ProcessId

The UIAutomation object process id.

Declaration
int ProcessId { get; }
Property Value
Type Description
int

ProcessName

The UIAutomation object process name.

Declaration
string ProcessName { get; }
Property Value
Type Description
string

RangeValuePattern

The range value pattern, providing access to the relevant methods and properties.

Declaration
IRangeValuePattern RangeValuePattern { get; }
Property Value
Type Description
IRangeValuePattern

ScrollItemPattern

The scroll item pattern, providing access to the relevant methods and properties.

Declaration
IScrollItemPattern ScrollItemPattern { get; }
Property Value
Type Description
IScrollItemPattern

ScrollPattern

The scroll pattern, providing access to the relevant methods and properties.

Declaration
IScrollPattern ScrollPattern { get; }
Property Value
Type Description
IScrollPattern

SelectionItemPattern

The selection item pattern, providing access to the relevant methods and properties.

Declaration
ISelectionItemPattern SelectionItemPattern { get; }
Property Value
Type Description
ISelectionItemPattern

SelectionPattern

The selection pattern, providing access to the relevant methods and properties.

Declaration
ISelectionPattern SelectionPattern { get; }
Property Value
Type Description
ISelectionPattern

Status

Describes the status of the current object. For example, an item associated with a contact in a messaging application might be "Busy" or "Connected".

Declaration
string Status { get; }
Property Value
Type Description
string

SupportedPatterns

The list of patterns supported for the test object.

Declaration
string[] SupportedPatterns { get; }
Property Value
Type Description
string[]

TableItemPattern

The table item pattern, providing access to the relevant methods and properties.

Declaration
ITableItemPattern TableItemPattern { get; }
Property Value
Type Description
ITableItemPattern

TablePattern

The table pattern, providing access to the relevant methods and properties.

Declaration
ITablePattern TablePattern { get; }
Property Value
Type Description
ITablePattern

TextPattern

The text pattern, providing access to the relevant methods and properties.

Declaration
ITextPattern TextPattern { get; }
Property Value
Type Description
ITextPattern

TogglePattern

The toggle pattern, providing access to the relevant methods and properties.

Declaration
ITogglePattern TogglePattern { get; }
Property Value
Type Description
ITogglePattern

ValuePattern

The value pattern, providing access to the relevant methods and properties.

Declaration
IValuePattern ValuePattern { get; }
Property Value
Type Description
IValuePattern

Width

The object's width (in pixels).

Declaration
int Width { get; }
Property Value
Type Description
int

WindowPattern

The window pattern, providing access to the relevant methods and properties.

Declaration
IWindowPattern WindowPattern { get; }
Property Value
Type Description
IWindowPattern

X

The object's x-coordinate (left) relative to the parent object (in pixels).

Declaration
int X { get; }
Property Value
Type Description
int

Y

The object's y-coordinate (top) relative to the parent object (in pixels).

Declaration
int Y { get; }
Property Value
Type Description
int

Methods

GetUIAAncestors(uint?, uint?)

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.

Declaration
IUiObjectBase[] GetUIAAncestors(uint? minDepthLevel = null, uint? maxDepthLevel = null)
Parameters
Type Name Description
uint? 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.

uint? 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
Type Description
IUiObjectBase[]

The collection of all the parent objects in the object's hierarchy, up to the specified depth level.

GetUIAAncestors<TAncestor>(IDescription, uint?, uint?)

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.

Declaration
TAncestor[] GetUIAAncestors<TAncestor>(IDescription description, uint? minDepthLevel = null, uint? maxDepthLevel = null) where TAncestor : class, IUiObjectBase
Parameters
Type Name Description
IDescription description

A description containing the set of properties and values that should be common to all objects that are returned.

uint? 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.

uint? 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
Type Description
TAncestor[]

The collection of all the parent objects in the object's hierarchy that match the specified description, up to the specified depth level.

Type Parameters
Name Description
TAncestor

The generic type of the ancestor test object.

GetUIAChildren()

Returns the collection of immediate children contained within the object.

Declaration
IUiObjectBase[] GetUIAChildren()
Returns
Type Description
IUiObjectBase[]

The collection of immediate children contained within the object.

GetUIAChildren<TChild>(IDescription)

Returns the collection of immediate children contained within the object that match the specified description.

Declaration
TChild[] GetUIAChildren<TChild>(IDescription description) where TChild : class, IUiObjectBase
Parameters
Type Name Description
IDescription description

A description containing the set of properties and values that should be common to all objects that are returned.

Returns
Type Description
TChild[]

The collection of immediate children contained within the object that match the specified description.

Type Parameters
Name Description
TChild

The generic type of the child test object.

GetUIADescendants(uint?, uint?)

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.

Declaration
IUiObjectBase[] GetUIADescendants(uint? minDepthLevel = null, uint? maxDepthLevel = null)
Parameters
Type Name Description
uint? 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.

uint? 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
Type Description
IUiObjectBase[]

The collection of all the objects contained or nested beneath the object within the specified depth range.

GetUIADescendants<TDescendant>(IDescription, uint?, uint?)

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 parent is level 1, its parent is level 2, and so on.

Declaration
TDescendant[] GetUIADescendants<TDescendant>(IDescription description, uint? minDepthLevel = null, uint? maxDepthLevel = null) where TDescendant : class, IUiObjectBase
Parameters
Type Name Description
IDescription description

A description containing the set of properties and values that should be common to all objects that are returned.

uint? 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.

uint? 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
Type Description
TDescendant[]

The collection of all the objects contained or nested beneath the object that match the specified description, within the specified depth range.

Type Parameters
Name Description
TDescendant

The generic type of the descendant test object.

GetUIAParent()

Returns the object's immediate parent object. For the root object, which has no parent, null is returned.

Declaration
IUiObjectBase GetUIAParent()
Returns
Type Description
IUiObjectBase

The object's immediate parent object. For the root object, which has no parent, null is returned.

Extension Methods

TestObjectExtensions.WaitUntilExists<T>(T)
TestObjectExtensions.WaitUntilExists<T>(T, int)
TestObjectExtensions.WaitUntil<T>(T, Func<T, bool>)
TestObjectExtensions.WaitUntil<T>(T, Func<T, bool>, int)