UIAutomation Object

Description

Enables you to access UI Automation native methods.

For more details on UI Automation, see the section on extending UFT One object identification in the UFT One User Guide.

Methods and Properties

Method GetElementFromPointReturns an object at the selected coordinates.
Method GetFocusedElementReturns the currently focused object.
GetRootElementReturns the Desktop object (which is the root element of all objects in the hierarchy).
CreatTOFromUIA

Converts a UIAutomation object to a UI Automation test object.

CreatTOColFromUIA

Converts a UIAutomation object to a UI Automation test object collection.

Back to top

GetElementFromPoint Method

Description

Returns an object at the selected coordinates.

Syntax

UIAutomation.GetElementFromPoint x, y

Arguments

xThe x-coordinate at which to find the object.
yThe y-coordinate at which to find the object.

Back to top

GetFocusedElement Method

Description

Returns the currently focused object.

Syntax

UIAutomation.GetFocusedElement

Return Value

UI Automation object

Back to top

GetRootElement Property

Description

Returns the Desktop object (which is the root element of all objects in the hierarchy).

Syntax

UIAutomation.GetRootElement

Returns

Desktop object

Back to top

CreatTOFromUIA Method

Description

Converts a UIAutomation object to a UI Automation test object.

This method uses the UIAutomation utility object to create a UI Automation test object based on the control type.

For example, if the control is of a button type, this method creates a UIAButton test object.

For more details, see UI Automation.

Syntax

UIAutomation.CreatTOFromUIA

Return

A UI Automation test object.

IMPORTANT

This method should be used in combination with other UI Automation utility object methods or UI Automation native methods.

Back to top

CreatTOColFromUIA Method

Description

Converts a UIAutomation object to a UI Automation test object collection.

This method uses the UIAutomation utility object to create a UI Automation test object collection based on the control type.

For example, if the control is of a button type, this method creates a UIAButton test object collection.

For more details, see UI Automation.

Syntax

UIAutomation.CreatTOColFromUIA

Return

A collection of test objects which can be a single UI Automation element or a group of UI Automation Elements

IMPORTANT

This method should be used in combination with other UI Automation utility object methods or UI Automation native methods.

Back to top

See also: