For every new interface created in TestArchitect, a default $ Class Maps entity is assigned. This entity is
user-editable and allows for user-defined mappings to be created between
native control classes and TA classes.
In addition, it allows for native control
classes to be mapped to user-defined TA classes.
Custom class mapping is only supported for the
- Windows Presentation Foundation (WPF)
- Windows Forms (WinForms)
In the $Class Maps entity, you can manually add new mappings, and edit
or remove existing ones. It is suggested, however, that you create your mappings through the
Interface Viewer (or Element Definition window), from which you may launch
dialog boxes, such as Map
to Known Class, or Map to New
Class to accomplish these tasks.
A $Class Maps
entity consists of three arguments:
- ta class: The TA class (built-in or
user-defined) to which a control is mapped.
A user-defined TA class is one that TestArchitect
does not inherently know anything
about. Of TestArchitect
's large library of
user-interface built-in actions, only the most generic ones, such as click
, check control exists
, and get control property
, can operate on controls mapped to such a
class. You may, however, effectively extend TestArchitect
's library of actions by creating user-scripted actions
that are specifically
designed to apply to your new user-defined TA class.
- native class:
- native class property (WPF,
- win class property (Win32)
- class name property (iOS)
- raw class property (Android)
- role property (WPF)
- win type property (Win32)
- class name property (Silverlight)
Restriction: role argument is unavailable with iOS
and Android applications.
For example, the mapping entry below can be interpreted as "every control whose
native class property is
System.Windows.Controls.Button, and whose role is
button, is mapped to TA class
Restriction: No class mappings may be placed above the PLATFORM
WIN32 section. Doing so results in an error message.
As of version 7.2
of TestArchitect Client
, a new format of the $ Class
entity is in effect. A pre-7.2 $ Class Maps
creation, populated with TA's default mappings of native controls to built-in TA classes.
With 7.2, a new $ Class Maps
is empty - default TestArchitect
mappings are relegated to a hidden system file.
and beyond, older $ Class
's are automatically converted to the new format when you connect and log in
to the repository (see Working with repositories