Modifying Object Maps

By default, object maps are read only. When you record a visual test or script that uses object maps, object map items are added to the database as assets.

When you finish recording a visual test or script that uses an object map, Silk Test Workbench determines if another user is using that object map. If another user is modifying the object map, a message box notifies you that the object map is being modified by another user and provides the name of that user. To prevent locked object maps from prohibiting recording, you can set the Record locators for locked object maps option to Yes in the Options dialog box. With this setting, when an object map is being modified by another user, any previously identified object map items are used where applicable and locators are used for any new objects that you record.

An existing object map is able to reuse existing object map identifiers during recording, even if you have added additional structural elements to the object map.

Example: Adding a DIV to an existing object map

Let us suppose you want to add a DIV element to bundle the email and login fields in the following simple object map:
demo_borland_com                               //BrowserApplication
  BrowserWindow                                         //BrowserWindow
    login-form email                                    //INPUT[@id='login-form:email']
    login-form login                                    //INPUT[@id='login-form:login']

You can change the structure of the object map by adding the new DIV loginArea and the object map will still be able to correctly reuse the object map identifiers during recording.

demo_borland_com                               //BrowserApplication
  BrowserWindow                                         //BrowserWindow
    loginArea                                           //'DIV[@id='login']
      login-form email                                  //INPUT[@id='login-form:email']
      login-form login                                  //INPUT[@id='login-form:login']