Adding an Object Map Item

Object map items are automatically created when you record a visual test or script. Occasionally, you might want to manually add an object map item.

  1. Choose View > Asset Browser or select Get Started > Asset Browser in the Start Screen.
  2. From the Asset Types list, select Object Map. Any existing object maps for the selected project display in the right pane.
    Tip: If you do not see the object map that you want to edit, ensure that the correct project is selected in the Active Project list.
  3. Double-click the object map to which you want to add the new item. The object map displays a hierarchy of the object map items and the locator associated with each item.
    Note: If another user is currently editing the object map that you select, a message box notifies you and names the user who currently has the object map locked.
  4. Click Edit. By default, the object map is read only. Clicking Edit gives you read/write access and ensures that no other users can edit the entries while you are modifying them. You can also press F2 to edit the currently selected field in the object map. The Edit button changes to Revert. If you want to undo any changes that you make during this session, click Revert.
  5. In the object map hierarchy, right-click on the item below which you want to add the new object map item. For instance, to include an item on the first level of the hierarchy, right-click on the first item name in the item list. To position the new item a level below a specific item, right-click on the item below which you want to position the new item.
  6. Click Insert new. A new item is added to the hierarchy, as the first child of the current node.
  7. If you have a valid locator path, you can type the item name and locator path that you want to use and then press Enter. To determine a valid locator path, use the Identify Object dialog box as described in the following steps:
    1. Choose Tools > Identify Object.
      The Select Application dialog box might open if the test application has not been associated with the object map. If this happens, select the application that you want to test and then click OK. The Identify Object dialog box opens.
    2. Specify the Selection mode.
      • Click – Click the object to identify the locator.
      • Hot Key – Specify this mode to capture the object using the keystroke combination specified in the Keystroke list box. Typically, you choose this mode to capture objects, such as a menu or combobox, that only appear when clicked by the user. With this mode, you select the object and then press the hot key keystroke combination to capture the locator without dismissing the object.
    3. Click Start Identify.
    4. Position the mouse over the object that you want to record and perform one of the following steps:
      • If you use Click mode, click the object that you want to identify.
      • Press the keystroke combination to capture the object with the Hot Key mode.

        By default, the keystroke combination is Ctrl+Shift.

      Silk Test Workbench lists the related locator string in the Selected Locator text box.
    5. Select the locator that you want to use in the Locator Details table. The new locator displays in the Selected Locator text box.
    6. Click Paste. Silk Test Workbench adds an item name and the associated locator to the object map.
  8. If necessary, modify the item name or locator text to meet your needs. If you use an invalid character or locator, the item name or locator text displays in red and a tooltip explains the error.

    Invalid characters for object map items include: \, /, <, >, ", :, *, ?, |, =, ., @, [, ].

    Invalid locator paths include: empty or incomplete locator paths.

  9. Perform one of the following steps:
    • Click Save to save your changes and continue working on the object map.

      Silk Test Workbench saves your changes as a new version and the object map mode goes back to read only.

    • Click Save and close to save your changes and exit the object map.

      Silk Test Workbench saves your changes as a new version and the object map is available for other users to modify.

Note: All child nodes of any node in the object map tree are sorted alphabetically when you save the object map.