Evaluating Expressions

You can use the Expressions window to evaluate an expression during debugging and to check the result. A script must be running in order for the evaluation to occur.

  1. Click View > Expression. The View menu item is available only while Silk Test Classic is in debugging mode.
  2. Type an expression into the input field in the top of the window.
    • If you type an expression into the input field, the result is the value of that expression.
    • If you type an variable name into the input field, the result is the value that the variable currently has in the running script.
    • If you type a function name into the input field, the result is the value that the function returns. Any function that you specify must return a value, and must be in scope at the current line.
    Properties and methods for a class are valid in expressions, as long as the declaration for the class they belong to is included in one of the modules used by the script being debugged.
  3. Press Enter. The Expression window displays the result of the evaluation directly beneath the expression.

If an expression evaluates to a complex value, like an array, Silk Test Classic might display its result in collapsed form. To expand or collapse the display, click View > Expand Data and View > Collapse Data in the Silk Test Classic menu or double-click the plus (+) icon.