Renaming an Object Map Item

You can manually rename items and locators in an object map.

Warning: Renaming an object map item affects every visual test or script that uses that item. For example, if you rename the Cancel button object map item from CancelMe to Cancel, every script that uses CancelMe must be changed manually to use Cancel.

Object map items must be unique. If you try to add a duplicate object map item, Silk Test Workbench notifies you that the object must be unique.

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.

When you rename the root node of the object map, the object map asset is also renamed. You cannot save an object map asset if you have changed the name of the root node to the name of an existing object map asset. When you change the object map asset name, the root node of the object map is also renamed.

  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. Choose one of the following:
    • Double-click the object map that includes the object map item that you want to rename.
    • Right-click the object map that includes the object map item that you want to rename and choose Open.
    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. Navigate to the object map item that you want to rename. For example, you might need to expand a node to locate the item that you want to rename.
  6. Click the object that you want to rename and then click the object again or press F2. Once you access in-line editing mode, you can click an object one time to edit it. Press Tab to toggle between the name and the description of the object map item. A black box displays around the item field and the text is highlighted.
  7. Type the item name that you want to use and then press Enter. If you use an invalid character, the item name displays in red. The new name displays in the Item name list.
  8. 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.

If any existing visual tests or scripts use the item name that you changed, you must manually change the visual tests or scripts to use the new item name.

Note: While recording against a web application or a mobile web app, you can directly change the name of the object map entry in the Choose Action dialog. Right-click on the object and then expand the Object identification area of the Choose Action dialog. Then you can edit the object map entry in the Object Map ID field. This functionality is available if you are testing against one of the following browsers:
  • Microsoft Edge.
  • Apple Safari.
  • Mozilla Firefox 41 or later.
  • Google Chrome 50 or later.
  • A mobile browser.