Adding an Object Map Item

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

  1. In the Package Explorer, click on the Object Maps folder of the project in which the object map that you want to change is located.
  2. 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.
  3. 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.
  4. Click Insert new. A new item is added to the hierarchy, as the first child of the current node.
  5. 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 Locator Spy dialog box as described in the following steps:
    1. In the Silk4J tool bar, click Locator Spy.
    2. Position the mouse over the object that you want to record and press CTRL+ALT. Silk4J displays the locator string in the Locator text field.
    3. Select the locator that you want to use in the Locator Details table.
    4. Copy and paste the locator into the object map.
  6. 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.

  7. Press CTRL+S to save your changes
Note: All child nodes of any node in the object map tree are sorted alphabetically when you save the object map.