Recording Statement


Specifies a block of recorded 4Test statements in a script.


recording statement[statement]…


When you record actions using Record Testcase, Record Actions, and so on, Silk Test Classic pastes the actions to the editor as a block identified by the recording statement. You can cause Silk Test Classic to omit the recording statement by setting the following value in the [Runtime] section of your option set, Partner.ini or project .ini file:


The default value of UseRecordingStatement is TRUE.

The recording statement provides two advantages:

  • It allows you to easily see which statements were recorded and which were hand-coded.
  • It allows the Agent to play back recorded statements differently than hand-coded statements.

During playback, when the Agent enters a block delimited by the recording statement, it turns off the requirement that windows be verified as active, exposed, or closed (that is, it implicitly sets OPT_REQUIRE_ACTIVE, OPT_VERIFY_ACTIVE, OPT_VERIFY_CLOSED, and OPT_VERIFY_EXPOSED to FALSE). This makes the play back less strict. You need less strict playback for statements that were originally recorded because you know that they were valid. When the Agent leaves a recording block, it restores the Agent options to their previous states.

If you want to override the Agent turning off these options in a Recording block, add the following statements to your partner.ini file:



If you record actions to open a new document in the TextEditor, the following is pasted into the editor: