Save to File Operation

Applies to TestComplete 15.64, last modified on June 12, 2024


The Save to File operation saves text or binary data to a specified file. If the file already exists, the operation will overwrite it.

For example, you can use the operation to save the response from the Send Request operation.

To save the response to a file

Operation Result

The operation returns True if the file was created or overwritten. Otherwise, it returns False.

Operation Parameters

When you add the operation to your keyword test, TestComplete displays a wizard that contains the following pages:

Specify File Parameters

On this page, you specify the location and encoding of the source file.

File name

Specifies the fully-qualified name of a file.

Note: The folder, where the file resides, must exist. Otherwise, the operation will fail.


Data encoding used in the file. Possible values are:

  • ANSI

  • Unicode

  • UTF-8

  • Binary


Content to write to the specified file.

Besides constant file content, you can specify values of a test parameter, variable, last operation result, or a code expression. To do this, click the ellipsis button and specify the desired value by using the Edit Value dialog.

Operation Parameters

On the Operation Parameters page, you can review the parameters you have created and change them if needed.

To change the operation parameter’s value, do one of the following:

  • Specify a new value in the Value column.

– or –

  • Click the ellipsis button in the corresponding cell of the Value column and edit the value in the subsequent dialog. For detailed information about possible values, see Specifying Operation Parameters.

Once ready, click Finish to apply the changes you have made and create a new keyword test item.


See Also

Specifying Operation Parameters
Load from File Operation
Send Request Operation
Data Access

Highlight search results