Search and Replace in the Name Mapping Repository

Applies to TestComplete 15.45, last modified on December 01, 2022

You can quickly locate mapped objects in the Name Mapping repository by their names, property names, and property values. You can also quickly replace the object names and their identification property values if needed. It is possible to search for and replace matches individually as well as find and replace them all at once.

To quickly locate an object in the Name Mapping repository, start typing its name, property name, property value, or description in the Search field on the editor toolbar. TestComplete will show you the search suggestions and mark the repository panels as Filtered if it finds any matches.

To clear the Search field, click .

Search for mapped objects

Click the image to enlarge it.

Search and replace

  1. Open the Name Mapping repository.

  2. To find a mapped object, alias, or property name or value, select Edit > Find from TestComplete menu, or press CTRL+F. The Find dialog opens.

    To replace the mapped object name, alias, or property value, select Edit > Replace from TestComplete menu, or press CTRL+H. The Replace dialog opens.

    The Find dialog

    The Find dialog

    The Replace dialog

    The Replace dialog
  3. In the Find what box, enter the object name, property name, property value or expression that you want to find.

  4. (When performing a replacement.) In the Replace with box, enter the value with which you want to replace the found matches. If you want to delete instances of the sought-for expression, leave the Replace with value blank.

    Note: You can also paste the sought-for and replacement expressions from the clipboard, or select the recently used expressions from the list.
  5. In the Look in combo box, select Current Document or Panel.

  6. If needed, specify other search options:

    • To perform a case-sensitive search, select Match case.

    • To find only those instances of the sought-for value that are complete words, select Match whole word.

    • To search upward from the selected position in the Name Mapping editor, select Search up.

    • To enable the use of wildcards or regular expressions in the sought-for value, select Use and choose the appropriate option.

      The supported wildcards are * and ?: the asterisk (*) matches zero or more characters and the question mark (?) matches any single character.

      For more information about regular expressions, see Regular Expressions Syntax.

    Note: The Find Options specified in the Find and Replace dialogs are preserved between searches during the current TestComplete session.
  7. To perform a search operation:

    • Click Find Next to find the first instance of the specified expression. TestComplete will highlight it in the Name Mapping repository.

      The Find dialog remains open and you can click Find Next again to find the next matches. You can also close the Find dialog and find next matches using the F3 shortcut.

      – or –

    • Click Find All to find all instances of the specified expression at once. TestComplete will display all found matches in the Search/Replace Results panel. (If this panel is hidden, select View > Select Panel from the TestComplete main menu and then select Search/Replace Results from the ensuing Select Panel dialog.) You can jump to a specific found match the by double-clicking its entry in the list.

    To perform a replace operation:

    • Click Find Next to find the first instance of the sought-for expression. TestComplete will highlight it in the Name Mapping repository. Click Replace to replace it with the new value and to proceed to the next match. If you do not want to replace the current match, click Find Next to skip it.

      – or –

    • Click Replace All to replace all found matches with the new values at once. TestComplete will display all the replacements made in the Search/Replace Results panel. You can jump to a specific replaced match by double-clicking its entry in the list.

Notes

See Also

How To
Name Mapping
Locate Mapped Objects
Find Dialog
Replace Dialog

Highlight search results