You can manually rename items and locators in an object map.
Warning: Renaming an object map item affects every script that uses that item. For example, if you rename the
Cancel button object map item from
Cancel, every script that uses
CancelMe must be changed manually to use
Object map items must be unique. If you try to add a duplicate object map item,
Silk4J 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.
If any existing scripts use the item name that you changed, you must manually change the scripts to use the new item name.
While recording against a web application or a mobile web app, you can directly change the name of the object map entry in
dialog. Right-click on the object and then expand the
area of the
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.