Creating mappings with the Interface Viewer

Use the Interface Viewer to create mappings for user interface elements.
Before proceeding: Ensure that the my login interface entity file has been saved and is displayed in the editor.

  1. If you have not already done so, start the Car Rental application by selecting Start > All Programs > TestArchitect > Samples > Car Rental Application.
    The login window appears.

Important: 
This window is the target of the interface entity you created in the last exercise. Recall that you created an interface element mapped to a User name control. To avoid any confusion, note that there are two controls on this window that relate to User name. One is of TA class label, and has its caption property set to User name. You have not mapped this control, so your interface entity knows nothing of its existence. To the right of this control is a textbox control, with a label property set to User name. This is the control you have mapped to:

  1. Click the Interface Viewer button on the toolbar.

    TestArchitect Client is minimized, and the Interface Viewer utility launches.

  2. In the Interface Viewer’s UI explorer panel (at left), expand the textbox subnode of the MY LOGIN(Car Rental-Login) tree by clicking its icon . Optionally, go ahead and expand a few other subnodes. Select the MY USER NAME subnode under textbox.

    If the node for the Car Rental-Login window does not include the text MY LOGIN, it is not mapped to your interface entity, and the reason is most likely that you did not have the my login interface entity open in the editor when you launched the Interface Viewer.

    Notes: 
    Note the two green check marks in the UI Explorer. These indicate successful mappings between

    • the open interface entity, MY LOGIN, and its matching window, Car Rental-Login
    • the interface element for TA name MY USER NAME and the control with label = User name (as indicated in the Properties panel).

    Notes: 
    TA names are case insensitive, and are always displayed in upper case in the Interface Viewer’s UI explorer Tree.

So far the only control that your interface definition enables you to work with is the User name control, due to the mapping you created manually. Now you will use the Interface Viewer to create another interface element definition.

  1. Expand the node for the class password text by clicking the icon next to it.

    A single child node appears indicating an unmapped Password field:

  2. Double-click the Password subnode.

    The Interface Viewer creates a tentative mapping for this control (tentative because it has not yet been written to the interface entity), with a suggested TA name of PASSWORD.

  3. Notes: 
    This new mapping can be saved to the existing interface entity. Before saving, rename the mapping with your own TA name:

    a. Right-click the Password subnode and select Rename.

    b. Type my password and Press Enter.

    c. With the label property selected, select the role property on the TA Properties tab.

  4. Click Save and close the Interface Viewer.

    A new interface element for the Password textbox control is now included in the interface entity, which should resemble the following figure:

    Notes: 
    During a test run, when TestArchitect reads this line, it will interpret it as

    “Within the window whose TA name is my login, assign the TA name my password to the control which is of class password text and has the properties label and role set to Password and password text, respectively.”

    Notes: 
    In case you’re wondering, yes, this is overkill. In fact, because there is only one control of class password text in the entire window, both of the two property-value pairs at the end of the definition could be removed. If so, TestArchitect would still be able to uniquely identify the control.

Next, you will put your interface definitions to use in a test.

Related concepts

The Interface Viewer


Copyright © 2023 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(800) 322-0333