If items in the test application change, you can use the
Object Map UI to update the locators for these items.
When you update an object map item from the AUT, you can change only the XPath representations of leaf nodes in the object
map tree. You cannot change the XPath representations of any parent nodes. When the XPath representations of higher-level
nodesin the object map tree are not consistent after the update, an error message displays.
Example
For example, suppose you have an object map item with an object map ID that has the following three hierarchy levels:
WebBrowser.Dialog.Cancel
The corresponding XPath representation of these hierarchy levels is the following:
/BrowserApplication//Dialog//PushButton[@caption='Cancel']
- First hierarchy level:
/BrowserApplication
- Second hierarchy level:
//Dialog
- Third hierarchy level:
//PushButton[@caption='Cancel']
You can use the following locator to update the object map item:
/BrowserApplication//Dialog//PushButton[@id='123']
- First hierarchy level:
/BrowserApplication
- Second hierarchy level:
//Dialog
- Third hierarchy level:
//PushButton[@id='123']
You cannot use the following locator cannot to update the object map item, because the second level hierarchy nodes do not
match:
/BrowserApplication//BrowserWindow//PushButton[@id='9999999']
- First hierarchy level:
/BrowserApplication
- Second hierarchy level:
//BrowserWindow
- Third hierarchy level:
//PushButton[@id='9999999']