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 Micro Focus UFT One User Guide.
Methods and Properties
GetElementFromPoint | Returns an object at the selected coordinates. |
GetFocusedElement | Returns the currently focused object. |
GetRootElement | Returns 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. |
GetElementFromPoint Method
Description
Returns an object at the selected coordinates.
Syntax
UIAutomation.GetElementFromPoint x, y
Arguments
x | The x-coordinate at which to find the object. |
y | The y-coordinate at which to find the object. |
GetFocusedElement Method
Description
Returns the currently focused object.
Syntax
UIAutomation.GetFocusedElement
Return Value
UI Automation object
GetRootElement Property
Description
Returns the Desktop object (which is the root element of all objects in the hierarchy).
Syntax
UIAutomation.GetRootElement
Returns
Desktop object
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.
set TestObj = UIAutomation.GetRootElement().CreatTOFromUIA()
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.
set TestObj = UIAutomation.GetChildren().CreatTOColFromUIA()
See also:
- Crypt Object
- DataTable Object
- Description Object
- DeviceReplay Object
- DotNetFactory Object
- DTParameter Object
- DTSheet Object
- Environment Object
- Extern Object
- Parameter Object
- JSON Object
- JsonUtil Object
- MercuryTimers Object (Collection)
- MercuryTimer Object
- NV Object
- OptionalStep Object
- ParallelUtil Object
- LocalParameter Object
- PasswordUtil Object
- PathFinder Object
- PDFUtil Object
- Properties Object (Collection)
- QCUtil Object
- RandomNumber Object
- Recovery Object
- Remote Connection Object
- Reporter Object
- RepositoriesCollection Object
- Repository Object
- Services Object
- Setting Object
- SystemMonitor Object
- TestArgs Object
- TextUtil Object
- UIAutomation Object
- VisualRelation Object
- VisualRelations Object
- VisualRelationsCollection Object
- WebUtil Object
- XMLUtil Object