Finding and Replacing Text in Code Editor

Applies to TestComplete 15.69, last modified on November 13, 2024

To find or replace text in the Code Editor, use the appropriate commands of the TestComplete Edit menu:

  • Find (default shortcut is Ctrl+F). This menu item opens the Find dialog, where you can specify the following search options:

    • The text you wish to find (you can use regular expressions or wildcards within this text).

    • The search direction (up or down).

    • Scope of the search:

      To search within selected code in the current unit, select Selection in the Current Document or Panel.

      To search within the current unit, select Current document or panel.

      To search within open script units, select Open documents.

      To search within all script units, select Project Suite.

    • The use of regular expressions or wildcards (* and ?).

    • Case-sensitivity.

    • Searching for text within collapsed blocks.

    • Searching for whole words.

    Click Find Next to get the next occurrence of the sought-for text. TestComplete will highlight the text in the Code Editor.

    To continue searching for the next occurrence of the sought-for text, click Find Next in the Find dialog or press F3.

    To get a list of all occurrences of the sought-for text, click Find All. TestComplete will show the list of all occurrences in the Search/Replace Results panel.

    For more information on search options, see the Find dialog description.

  • Replace (default shortcut is Ctrl+H). Use this item to find and replace text in the Code Editor. The search options are similar to those of the Find Text dialog. See Replace dialog for details.

You can change the default shortcuts used to call the Find and Replace dialogs in the Customize Keyboard dialog.

See Also

Code Editor
Finding and Replacing
Customize Keyboard Dialog
Code Navigation

Highlight search results