Table of Contents

Interface IUiObjectBase

Namespace
HP.LFT.SDK.UIAPro
Assembly
HP.LFT.SDK.dll

Base interface for all UIAPro test objects.

public interface IUiObjectBase : IClickable, IDoubleClickable, ISupportSendKeys, ITopLevelObject, ITestObject, ITestObjectDescriber
Inherited Members
Extension Methods

Properties

AbsX

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

int AbsX { get; }

Property Value

int

AbsY

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

int AbsY { get; }

Property Value

int

AcceleratorKey

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

string AcceleratorKey { get; }

Property Value

string

AccessKey

The character that is used to activate the object.

string AccessKey { get; }

Property Value

string

AutomationId

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

string AutomationId { get; }

Property Value

string

ControlType

The UIAPro type for the object.

string ControlType { get; }

Property Value

string

ExpandCollapsePattern

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

IExpandCollapsePattern ExpandCollapsePattern { get; }

Property Value

IExpandCollapsePattern

FrameworkId

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

string FrameworkId { get; }

Property Value

string

GridItemPattern

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

IGridItemPattern GridItemPattern { get; }

Property Value

IGridItemPattern

GridPattern

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

IGridPattern GridPattern { get; }

Property Value

IGridPattern

Handle

The run-time object's window handle.

int Handle { get; }

Property Value

int

HasKeyBoardFocus

Indicates whether the object has keyboard focus.

bool HasKeyBoardFocus { get; }

Property Value

bool

Height

The object's height (in pixels).

int Height { get; }

Property Value

int

InvokePattern

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

IInvokePattern InvokePattern { get; }

Property Value

IInvokePattern

IsEnabled

Indicates whether the object is enabled.

bool IsEnabled { get; }

Property Value

bool

IsKeyboardFocusable

Indicates whether the object can accept keyboard focus.

bool IsKeyboardFocusable { get; }

Property Value

bool

IsOffScreen

Indicates whether the object is Offscreen.

bool IsOffScreen { get; }

Property Value

bool

IsPassword

Indicates whether the object contains protected content or a password.

bool IsPassword { get; }

Property Value

bool

LegacyIAccessiblePattern

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

ILegacyIAccessiblePattern LegacyIAccessiblePattern { get; }

Property Value

ILegacyIAccessiblePattern

Name

The name of the control.

string Name { get; }

Property Value

string

NativeClass

The class name assigned to the test object.

string NativeClass { get; }

Property Value

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.

string Path { get; }

Property Value

string

ProcessId

The UIAutomation object process id.

int ProcessId { get; }

Property Value

int

ProcessName

The UIAutomation object process name.

string ProcessName { get; }

Property Value

string

RangeValuePattern

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

IRangeValuePattern RangeValuePattern { get; }

Property Value

IRangeValuePattern

ScrollItemPattern

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

IScrollItemPattern ScrollItemPattern { get; }

Property Value

IScrollItemPattern

ScrollPattern

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

IScrollPattern ScrollPattern { get; }

Property Value

IScrollPattern

SelectionItemPattern

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

ISelectionItemPattern SelectionItemPattern { get; }

Property Value

ISelectionItemPattern

SelectionPattern

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

ISelectionPattern SelectionPattern { get; }

Property Value

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".

string Status { get; }

Property Value

string

SupportedPatterns

The list of patterns supported for the test object.

string[] SupportedPatterns { get; }

Property Value

string[]

TableItemPattern

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

ITableItemPattern TableItemPattern { get; }

Property Value

ITableItemPattern

TablePattern

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

ITablePattern TablePattern { get; }

Property Value

ITablePattern

TextPattern

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

ITextPattern TextPattern { get; }

Property Value

ITextPattern

TogglePattern

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

ITogglePattern TogglePattern { get; }

Property Value

ITogglePattern

ValuePattern

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

IValuePattern ValuePattern { get; }

Property Value

IValuePattern

Width

The object's width (in pixels).

int Width { get; }

Property Value

int

WindowPattern

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

IWindowPattern WindowPattern { get; }

Property Value

IWindowPattern

X

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

int X { get; }

Property Value

int

Y

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

int Y { get; }

Property Value

int

Methods

GetUIAAncestors(IDescription, uint?, uint?)

Returns the collection of all the parent objects in the object's hierarchy that match the specified description filter, between the specified minimum and maximum depth levels. The object's immediate parent is level 1, its parent is level 2, and so on.

IUiObjectBase[] GetUIAAncestors(IDescription description, uint? minDepthLevel = null, uint? maxDepthLevel = null)

Parameters

description IDescription

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

minDepthLevel uint?

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

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

IUiObjectBase[]

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

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.

IUiObjectBase[] GetUIAAncestors(uint? minDepthLevel = null, uint? maxDepthLevel = null)

Parameters

minDepthLevel uint?

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

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

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 object type and description filter, between the specified minimum and maximum depth levels. The object's immediate parent is level 1, its parent is level 2, and so on.

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

Parameters

description IDescription

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

minDepthLevel uint?

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

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

TAncestor[]

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

Type Parameters

TAncestor

The generic type of the ancestor test object. To avoid limiting to a specific test object type, use IUiObjectBase.

GetUIAAncestors<TAncestor>(uint?, uint?)

Returns the collection of all the parent objects in the object's hierarchy that match the specified object type, between the specified minimum and maximum depth levels. The object's immediate parent is level 1, its parent is level 2, and so on.

TAncestor[] GetUIAAncestors<TAncestor>(uint? minDepthLevel = null, uint? maxDepthLevel = null) where TAncestor : class, IUiObjectBase

Parameters

minDepthLevel uint?

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

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

TAncestor[]

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

Type Parameters

TAncestor

The generic type of the ancestor test object. To avoid limiting to a specific test object type, use IUiObjectBase.

GetUIAChildren()

Returns the collection of immediate children contained within the object.

IUiObjectBase[] GetUIAChildren()

Returns

IUiObjectBase[]

The collection of immediate children contained within the object.

GetUIAChildren(IDescription)

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

IUiObjectBase[] GetUIAChildren(IDescription description)

Parameters

description IDescription

Returns

IUiObjectBase[]

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

GetUIAChildren<TChild>()

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

TChild[] GetUIAChildren<TChild>() where TChild : class, IUiObjectBase

Returns

TChild[]

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

Type Parameters

TChild

The generic type of the child test object. To avoid limiting to a specific test object type, use IUiObjectBase.

GetUIAChildren<TChild>(IDescription)

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

TChild[] GetUIAChildren<TChild>(IDescription description) where TChild : class, IUiObjectBase

Parameters

description IDescription

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

Returns

TChild[]

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

Type Parameters

TChild

The generic type of the child test object.To avoid limiting to a specific test object type, use IUiObjectBase.

GetUIADescendants(IDescription, uint?, uint?)

Returns the collection of all the objects contained or nested beneath the object that match the specified description filter between the specified minimum and maximum depth levels. The object's immediate children are level 1, their children are level 2, and so on.

IUiObjectBase[] GetUIADescendants(IDescription description, uint? minDepthLevel = null, uint? maxDepthLevel = null)

Parameters

description IDescription

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

minDepthLevel uint?

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

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

IUiObjectBase[]

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

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.

IUiObjectBase[] GetUIADescendants(uint? minDepthLevel = null, uint? maxDepthLevel = null)

Parameters

minDepthLevel uint?

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

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

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 object type and description filter, between the specified minimum and maximum depth levels. The object's immediate parent is level 1, its parent is level 2, and so on.

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

Parameters

description IDescription

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

minDepthLevel uint?

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

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

TDescendant[]

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

Type Parameters

TDescendant

The generic type of the descendant test object. To avoid limiting to a specific test object type, use IUiObjectBase.

GetUIADescendants<TDescendant>(uint?, uint?)

Returns the collection of all the objects contained or nested beneath the object that match the specified object type, between the specified minimum and maximum depth levels. The object's immediate parent is level 1, its parent is level 2, and so on.

TDescendant[] GetUIADescendants<TDescendant>(uint? minDepthLevel = null, uint? maxDepthLevel = null) where TDescendant : class, IUiObjectBase

Parameters

minDepthLevel uint?

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

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

TDescendant[]

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

Type Parameters

TDescendant

The generic type of the descendant test object. To avoid limiting to a specific test object type, use IUiObjectBase.

GetUIAParent()

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

IUiObjectBase GetUIAParent()

Returns

IUiObjectBase

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