Overwrite an inherited locator

If you have a class that contains child classes, any locators and fields that are configured for the parent are inherited by the child class. The inherited locators however, are read-only. If you encounter a situation where you want to break the inherited link between the parent and the child classes, you can overwrite the inherited child locator. This means that you can make changes to the child locator without affecting the parent or any sibling classes that have also inherited the same locator. You can overwrite an inherited locator by following these steps:

  1. Expand the Project Tree and select the class that contains the locator to overwrite.
  2. Optionally, view the class contents if they are not already displayed.

    The hidden class contents are displayed.

  3. Select the locator in the Project Tree.

    The Details window changes to display the selected locator.

  4. Click Copy Method to copy the locator and its settings from the parent class to the child class.
  5. Alternatively, select another Locator Method in the list.
  6. Configure the locator properties.
  7. Optionally, rename the overwritten locator.