6 Notes About HP UFT 12.52
The test tool HP Unified Functional Testing (UFT) provides support for UI Automation testing as of version 12.52. However, UFT does not fully support all UIA Control Types, but is limited to the most important Control Types and Control Patterns. Therefore, this chapter is only informative and should not replace reading the UFT documentation.
The UIA (UI Automation) support of UFT can be outlined as follows:
- The
UI Automation
add-in must be activated. - For identification with the Object Spy, the
UI Automation Mode
must be enabled. - Object identification is based on the UIA Properties Name and AutomationId.
-
The following UIA Control Types are recognized and converted into an appropriate UFT Object Model:
UIA Control Type
UFT Object Model
Button
UIAButton
Calendar
UIACalendar
CheckBox
UIACheckBox
ComboBox
UIAComboBox
Edit
UIAEdit
HyperLink
UIAHyperLink
List
UIAList
RadioButton
UIARadioButton
Slider
UIASlider
Tab
UIATab
DataGrid
UIATable
SplitButton
UIASplitButton
Window
UIAWindow
Table
UIATable
... andere ...
UIAObject
-
The following UIA Control Patterns are supported by UFT via special methods on the UIA Objects:
UIA Control Pattern
UFT Methods
ExpandCollapse
.Expand
.Collapse
Grid
.GetItem
Invoke
.Click
RangeValue
.Decrement
.Increment
.SetValue
Scroll
.Scroll
.ScrollDown
.ScrollUp
.ScrollLeft
.ScrollRight
.SetScrollPercent
ScrollItem
.ScrollIntoView
Selection
.Select
.AddToSelection
.RemoveFromSelection
.GetSelection
SelectionItem
.Select
.AddToSelection
.RemoveFromSelection
Table
.GetRowHeaders
.GetColumnHeaders
TableItem
.GetRowHeaderItems
.GetColumnHeaderItems
Transform
.Move
.Resize
.Rotate
Toggle
.Set
Value
.SetValue
Window
.Maximize
.Minimize
.Restore
.Close
This means that not all IDM object classes are distinguishably
recognized as test objects with own UIA Class by UFT. This includes the IDM object classes:
- toolbar
- statusbar
- scrollbar
- splitbox
- menubox, menuitem, menusep
- spinbox
- progressbar
- image
- rectangle
- control
- layoutbox, groupbox, splitbox
- edittext (RTF)
However, these should be recognized by UFT as generic UIAObjects and capable of being sufficiently tested and manipulated by the supported Pattern Methods.
It should be noted that with UI Automation Microsof covers the domains of accessibility
and test automation
, but does not provide full and correct capturing of user interaction. In this respect, the recording
of user interaction by UFT in UI Automation Mode is often incomplete and may also be faulty.
This can be seen, for instance, when recording
a menu interaction on a submenu. UFT generates the following malfunctioning script, which does not contain a Click
on the menu:
UIAWindow("Main window").UIAMenu("Application menu").UIAObject("File").Expand UIAWindow("Main window").UIAMenu("File").UIAObject(" ").Expand
A working script however would look like this:
UIAWindow("Main window").UIAMenu("Application menu").UIAObject("File").Click UIAWindow("Main window").UIAMenu("File").UIAObject(" ").Click UIAWindow("Main window").UIAMenu("File").Select " ;Menu A"
Recording
in Windows Mode produces the following working script:
Window("Main window").WinMenu("File").Select "File; ;Menu A"