UFT and the UI Automation framework

UFT uses the UIAutomation framework elements to:

  • Create UI Automation test objects based on the objects in your application

  • Create supported methods for these test objects based on the patterns supported for each object/control type

  • Create the test object hierarchy based on the UI Automation element tree

Control Types and UFT Test Objects

For a control that uses the UI Automation framework, the Control Type property describes the basic appearance and functionality of the control in the application.

UFT translates the Control Type property of an element/object in the application's user interface into a corresponding test object in UFT:

If the Control Type property is... UFT creates this test object:
50000 UIAButton
50001 UIACalendar
50002 UIACheckBox
50003 UIAComboBox
50004 UIAEdit
50005 UIAHyperLink
50008 UIAList
50013 UIARadioButton
50015 UIASlider
50018 UIATab
50023 UIATree
50028 UIATable
50031 UIASplitButton
50032 UIAWindow
50036

UIATable

This object must also have implemented the Grid pattern to be recognized as a table.

If the controls in your application use a different value for the Control Type property, or do not have a Control Type property implemented, they are identified as a UIAObject.

For a full listing of all the available values for the Control Type property, see the Control Type Identifers page on MSDN.

Back to top

Supported Patterns and Test Object Methods

UFT creates test object methods based on a control type's supported patterns. These patterns define a particular aspect of a control's functionality or feature. For a full explanation of how these patterns are used in your applications, see https://msdn.microsoft.com/en-us/library/ms752362(v=vs.110).aspx.

Each test object also supports all UFT common methods and properties, as well as additional UI Automation-specific methods, including .Click, ,.SetFocus and .Type. A number of test objects also have object-specific test object methods available for use.

For full details on these test object methods, see the UI Automation section of the UFT Object Model Reference for GUI Testing.

Note: The test objects and methods available are completely dependent on the properties and patterns implemented in your application. We recommend that you familiarize yourself with the properties of your application's objects - specifically the Control Type IDs and supported patterns to understand what test objects and methods you can use.

UFT creates test object methods based on the patterns:

If a object has this pattern... UFT has these test object methods:
ExpandCollapse
  • .Expand

  • .Collapse

Grid
  • .ActivateCell

  • .AddCellToSelection

  • .ClickRow

  • .GetCellName

  • .GetCellValue

  • .GetRows

  • .RemoveCellFromSelection

  • .RemoveRowFromSelection

  • .SelectCell

  • .SelectRow

Invoke .Click
RangeValue
  • .Decrement

  • .Increment

  • .SetValue

Scroll
  • .Scroll

  • .ScrollDown

  • .ScrollLeft

  • .ScrollRight

  • .ScrollDown

  • .SetScrollPercent

ScrollItem .ScrollIntoView
Selection
  • .Select

  • .AddToSelection

  • .RemoveFromSelection

  • .GetSelection

SelectionItem
  • .Select

  • .AddToSelection

  • .RemoveFromSelection

Table
  • .GetColumnHeaders

  • .GetRowHeaders

TableItem
  • .GetColumnHeaderItems

  • .GetRowHeaderItems

Text .GetText
Transform
  • .Move
  • .Resize
  • .Rotate
Toggle .Set
Value .SetValue
Window
  • .Maximize

  • .Minimize

  • .Restore

  • .Close

Back to top