When you are using object maps, existing locators that do not start with a slash will no longer work
Locators that include only a class name and that do not start with a slash, for example
, will no longer work if object maps exist. This issue might result in breaking existing scripts that were created in a
version prior to
14.0. For the previous example the script will fail with the following error:
Identifier 'PushButton' was not found in the Object Map.
More complex locators that include more than a class name, for example
PushButton[@caption=OK] will continue to work, even if object maps exist.
To fix this issue, add a
to the start of any such locator. For example, if the locator
in the following code does no longer work:
PushButton button = mainWindow.find("PushButton");
Change the code to:
PushButton button = mainWindow.find("//PushButton");