TestedApplication.SetFileDialogResult

Syntax:

SetFileDialogResult(<Result>, <FileName>, <FilterIndex>)

Parameters:

<Result> (required)

Type: Boolean.
Value containing the result of the function operation Choose or Show:
  • True – imitates successful completion of the function operation with file/files selection.
  • False – imitates user's cancellation from file selection.

<FileName> (optional)

Type: FixedArray; Array; String.
File name of file names if imitation of multiple choice is required.
If parameter Result has value True – this parameter is mandatory .
If parameter Result has value False – the transferred value is ignored.

<FilterIndex> (optional)

Type: Number.
Index of the active filter in the dialog after file(s) selection.
If parameter Result has value True – this parameter is mandatory .
If parameter Result has value False – the transferred value is ignored.

Description:

Specifies to testing client what the operation result of methods Choose and Show of the object FileDialog will be and defines a set of file names which will be the result of the dialog operation. The set values are valid till the operation of these methods is complete (one setting of values is valid for one dialog call).
The parameters defined will also be used during calls of file selection dialogs in methods BeginGettingFiles, to save documents, etc., in case of interactive work.
Important. When working in a web client, affects only the object operation FileDialog.
Upon calling, adds the transferred data to the queue from which data is retrieved in the order in which it was submitted.
If the file selection dialog opens on a client in the process of testing without preset data for the dialog, all subsequent calls of test manager methods will generate a runtime error "A system file operation dialog is open in the client" unless the user closes this dialog manually.
When logging user actions, this action is recorded after the action which initiated calling of the file dialog.
It should be noted that during testing this action should be called prior to the action that caused its initiation.

Availability:

Thin client, thick client.

    

1C:Enterprise Developer's Community