$ Class Maps entity

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.

Important:
Custom class mapping is only supported for the following applications:

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:

  1. ta class: The TA class (built-in or user-defined) to which a control is mapped.

    Note:
    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.

  2. native class:

    • native class property (WPF, Silverlight)
    • win class property (Win32)
    • class name property (iOS)
    • raw class property (Android)
    • SAP property
  3. role:

    • 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 button ”:


Restriction:
No class mappings may be placed above the PLATFORM WIN32 section. Doing so results in an error message.

Important:
As of version 7.2 of TestArchitect Client, a new format of the $ Class Maps entity is in effect. A pre-7.2 $ Class Maps is, upon 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. In TestArchitect 7.2 and beyond, older $ Class Map’s are automatically converted to the new format when you connect and log in to the repository (see Working with repositories).

Related tasks

Mapping unknown controls to a new class

Remapping known controls to a new TA class


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400