The Watch List panel allows you to create and manage watch expressions you want to track during the debugging.
Right-click somewhere within the Watch List panel and select New Item from the context menu. In the resulting Watch Properties dialog, specify the expression and its display format.
If you debug a script routine, you can also add a watch expression directly from the Code Editor in one of the following ways:
Use context menu
Move the insertion point to the desired expression in the Code Editor or select the expression in the Code Editor.
Right-click the selection and choose Debug > Add Watch from the context menu.
Drag the desired expression
Select the needed expression in the Code Editor.
Drag the selected expression from the Code Editor to the Watch List panel.
TestComplete will add the expression to the Watch List panel. You can then modify the expression as needed.
Typically, watch expressions contain a variable or parameter, whose value you would like to trace. If you debug a script routine, you can specify the variable (or parameter) name. If you debug a keyword test, then to specify the test’s variable, use the following syntax:
Besides the variables’ and parameters’ names, the watch expression may contain any other script code.
You may want to keep a watch expression available, but not calculate it. To do this, you can disable the expression:
Clear the expression’s check box in the Expression column.
– or –
Double-click the expression, and clear the Enabled check box in the resulting Watch Properties dialog.
The expression will be grayed out, and no value for it will be displayed.
Disabling unneeded expressions can save time during the test run as the debugger will not have to provide values of elements that may require complex system calls.
Right-click the desired watch expression in the Watch List panel and choose Edit from the context menu. This will call the Watch Properties dialog, in which you can edit the expression and its display format.
Specify the desired variable or array item in the Expression column.
Select the Value column and press F2, or click the Value cell twice (not a double-click). This will activate the in-place editor.
Specify a new value in the in-place editor and press Enter to confirm the input. Esc will cancel the change.
The script expression may contain constants, local variables, objects, properties, function calls as well as arithmetic and logical operators. TestComplete will execute the specified expression and assign it to the variable.
The specified value should be a valid script expression and it must match the syntax of your project’s scripting language.
To explore and change the values of some object parameters, you can select Inspect from the context menu of the desired object and assign new values to the parameters in the ensuing Inspect dialog.
For information on modifying variables’ values during debugging, see Changing Variables During Debugging.
Select the desired watch expression(s) in the Watch List panel (you can use Ctrl- or Shift-click for multiselection. To select all expressions, you can also choose the Select All item of the panel’s context menu).
Press Del or right-click the selected expression and choose Delete from the context menu.
Right-click the desired watch expression in the Watch List panel and choose Copy from the context menu.