Updating interface definitions

When the Action Recorder generates actions that operate on windows and controls, it populates the arguments of those actions with TA names. If necessary, it allows you to define those names “on the fly”.

If the windows and controls visited during a recording session have already been defined in the matching interface entity (or, in the event more than one exists, the matching interface entity that you select), the recorder recognizes them and inserts the TA names directly into the actions. It is therefore recommended that you define the requisite interface entities and elements first, before using the recorder.

When interface entities and elements are not created for given windows or controls prior to recording, the Action Recorder allows you to name them at the conclusion of recording, as demonstrated below using the About window of the Car Rental application.

  1. If the Car Rental application is running, return to the Login window; otherwise, start the application by selecting Start > All Programs > TestArchitect > Samples > Car Rental Application.

    The login window appears.

  2. Click Login, to log in with the default user name and password.

    The Car Rental-Welcome window is displayed.

  3. Select About > About.

    The Car Rental-About dialog box appears.

  4. Return to TestArchitect.

  5. In the Recording Lesson test module you created previously, create a new test case:

    1. Place your cell pointer on a line somewhere below the existing set of action lines (but before the FINAL section, if any).

    2. Click Create New Test Case on the toolbar.

      A test case line similar to the following is inserted.

    3. In the second column of the new line, assign the test case an ID of TC 03(if not already set to that value).

    4. Optional: Press Tab to advance to the next column, and provide a description for your test case, such as Adding interface definitions.

  6. Select an empty cell within test case TC 03.

Attention:
Once the Action Recorder starts, it records all actions, including any actions you take with this tutorial. For that reason, it is recommended that you read through to Step 11 now and not refer to this tutorial while the Action Recorder is recording.

  1. Start the Action Recorder by clicking the Action Recorder icon on the toolbar.

    The Action Recorder panel appears in the lower right corner of the screen, indicating recording mode is now in effect.

  2. Click the onscreen text that reads Version: 1.1 on the Car Rental-About window.

    Note:
    Although this text object is not a control that responds to your click, the action will be recorded, including the exact coordinates of the location of the click.

  3. Click OK to return to the Welcome screen.

  4. Click the onscreen text string Welcome to Car Rental Reservation.

  5. Click Stop on the recording panel.

    The New Interface Definitions dialog box appears.

    Note:
    If this dialog fails to appear: The Car Rental sample project installed with TestArchitect does not include interface definitions for the three controls you’ve just clicked on (and has no interface entity for the Car Rental-About window). If New Interface Definitions does not appear, however, it is likely the interface definitions needed for the generated action lines already exist, possibly because someone already performed this exercise with your repository. Delete them (the window and control arguments of your generated action lines tell you where to find them) and start the exercise again.

New Interface Definition dialog box

The New Interface Definitions dialog box is comprised of three panels:

  1. Change the auto-generated TA name for the About screen: in the leftmost panel, right-click the node car rentalabout, select Rename, then type My About Screen.

  2. Change the auto-generated TA name for the version label: right-click the element node reading version 1.1, select Rename, and type my version label.

  3. In similar fashion, change the node ok to my okay button.

  4. Now rename the welcome to car rental reservationnode to my welcome label.

    The dialog box should now resemble the following:

  5. Click Save. to add new action lines to the Recording Lesson test module, and to save the new interface definitions.

    Control returns to TestArchitect, which displays the newly generated action lines, along with the TA names defined by you (with the exception of welcome):

  6. Right-click either of the my about screen window arguments, and select Edit Interface Entity.

    The newly generated interface entity for the About window is displayed, along with the two interface elements you created for it during the recording process, and the TA names you assigned in the New interface definitions dialog box:

You have used the Action Recorder to generate action lines, as you did in the prior exercises of this Lesson. This time, however, your manual interactions involved controls (and a window) which were not yet defined by your project’s interface. The Action Recorder responded by creating new interface definitions, allowing you to assign your own choice of TA names to them.


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