Locator inheritance
In the Project Tree inherited locators are indicated by italic text and a generic and grey icon.
If you add a locator to the parent class after adding one or more child classes, that locator is added to all child classes, automatically. Similarly, if you make changes to the settings of a locator on the parent level, that change is propagated down to the child locator as long as the inheritance relationship is intact between parent and child.
The name of an inherited locator cannot be changed but you can modify other settings by either overriding or copying an inherited locator.
There are two different ways to modify an inherited locator. When modifications are made the modified inherited locator is local to the child class only and the inheritance link back to the parent is interrupted.
-
Override the inherited locator by selecting a value from the Locator Method list.
-
Make a copy of the inherited locator using the Copy Method button.
In either case it is mandatory for group locators that the overridden or copied locator contains the same subfields as the locator from the parent class. The order of the subfields does not matter and you can add additional subfields to the local locator.
Copy an inherited locator
If you change an inherited locator by clicking Copy Method, a complete replica of the parent locator method is made.
The name of the locator in the Project Tree remains grey and italic, but the icon is updated to the icon that represents that locator method. This indicates that there is a local copy of an inherited locator.
It is not possible to rename an inherited locator, even when a copy is made.
If there is a problem with the selected locator method, the icon
is updated to indicate a problem
and a warning message is displayed in the
Details pane. In many cases, the warning is due to an incompatibility between the original inherited
locator method and the new locator method. They both must belong to the same extraction type.
See Copy an inherited locator for more information.
Override an inherited locator
If you change an inherited locator by selecting a new method from the Locator Method list, the selected locator method value must have the same extraction type. Also, no matter which locator method you select, all settings from the parent are lost. This means that if you select the same locator method used by the parent, you are given a default locator method with none of its settings preconfigured. If you want to make changes to the inherited locator and keep the same locator method, see below to copy a locator instead.
The text of the overridden locator remains grey and italic but the icon changes to the selected locator method icon. This indicates that there is a local locator based on an inherited locator.
If there is a problem with the selected locator method, the icon
is updated to indicate a problem
and a warning message is displayed in the
Details pane. In many cases, the warning is due to an incompatibility between the original inherited
locator method and the new locator method. They both must belong to the same extraction type.
See Override an inherited locator for more information.
Related topics: