|Part 2: Becoming a TestArchitect power user / Lesson #3: Working with interface definitions|
The Interface Viewer assists in capturing elements of an application interface and generating interface definitions.
Mapping interface elements manually can be time-consuming and prone to error. The Interface Viewer is a support tool used to explore and capture elements of an application interface and generate interface definitions. The Interface Viewer enables you to:
Start the Interface Viewer by pressing F7 or click the Interface Viewer button on the toolbar.
Class and Hierarchy views of the same mapped window.
Unmapped controls are indicated with red double-angle brackets in the node icons. Mapped nodes are indicated with green check marks .
|Mapped window||class, hierarchy|
|Mapped control/container||class, hierarchy|
|Unmapped window||class, hierarchy|
|Unmapped control/container||class, hierarchy|
|Unmapped container (below window level)||hierarchy|
|Unknown class||class, hierarchy|
The Interface Viewer's Properties panel displays the properties and property values of the window or control currently selected in the Process Tree. This panel consists of two tabs: TA Properties and Native Properties. For the purposes of interfacing, most users can rely on the TA properties of a control and ignore the Native properties. Ensure that the property-value pairs displayed in the Properties Panel are taken from an actual UI object in an application, not from any interface entity.
You can edit the values of properties in the Properties panel it is not possible to change the properties of the actual UI controls.
For each mapped control (the ones with green check marks in the UI explorer panel), the check boxes next to each property determine which of the properties will be used in the corresponding interface element. For example, with the following properties checked for the given mapped control:
ta name ta class caption role interface element clear-button button Clear push button
The Interface Elements panel appears on the far right of the Interface Viewer when a mapped window exists in the UI explorer panel. This panel displays the interface elements of the interface entity behind the mapping.
None of the contents of this panel are editable. Clicking a mapped element in the Interface Elements panel highlights the corresponding node in the UI explorer panel.As with UI explorer, the interface elements that the Viewer successfully maps to the open application window are denoted with green check marks. If the Viewer is unable to find a matching UI control for an interface element, that element is marked with a red crossed-circle .
The Properties Comparison panel is of special value if and when you find that a defined interface element can no longer identify a control in your test application. This panel displays the differences between the defined property values in the interface element and the actual (just-captured) values of those properties in the corresponding control, allowing you to understand why that interface element is no longer able to identify the control.