Recording the Location of an Object

This functionality is supported only if you are using the Classic Agent.

Use the Record Window Locations dialog box to record the location of a graphical control, such as a toolbar, in relation to the screen, the frame, and the client window.

Pause/Resume Tracking
Click Resume Tracking after pasting to the editor, when you are ready to continue recording.

You can record the x, y locations of a graphical control, such as a toolbar. It can be useful to know the position of certain objects, for example objects that are drawn, like tools on a toolbar, or drawing regions, for example in a CAD/CAM package. A location is recorded relative to the screen, frame, and client window.

To record the location of an object:

  1. Click Record > Window Locations. The Record Window Locations dialog box appears.
  2. Optional: Check the Keep on top check box to keep the Record Window Locations dialog box in the foreground while you are moving the mouse cursor over the application under test. This check box is checked by default.
  3. Position the mouse cursor over the object, the location of which you want to record. The Record Window Locations dialog box displays the name of the object and the following x,y coordinates:
    • The Screen field displays the coordinates of the object in relation to the screen.
    • The Frame field displays the coordinates of the object in relation to the frame, which is the main window of the application under test, including the window decoration.
    • The Client field displays the coordinates of the object in relation to the client, which is the main window minus, excluding the window decoration.

    For example, if the application under test covers the full screen, and the main window of the application has no window decorations, the three coordinates are equal.

  4. Press Ctrl+Alt to pause the recording.
  5. Click the option button that corresponds to the coordinates that you want to record. For example, to add the location of the object to an existing window declaration, click the Client option.
  6. Click Paste to Editor to insert the relative location of your choice into the active Silk Test Classic editing window. The location is inserted at the cursor position.
  7. Click Copy to Clipboard to copy the location of the object named in the Location box to the clipboard. You can click Edit > Paste in the Silk Test Classic menu to insert the code into the location of your choice in the current editor window or even into a different window.
  8. Optional: Click Resume Tracking to record another location.
  9. Click Close.