FileDialog

Description

A class for a windows FileDialog to open or save files.

// FileDialog example for saving "myFile.txt"
var fileDialog = new FileDialog(t, App.SystemHelpers);
fileDialog.WaitForAppear();
fileDialog.SetFileName("myFile.txt");
fileDialog.Save();

FileDialog Class

Namespace: Progile.TRIO.EnvironmentModel Assembly: Progile.TRIO.EnvironmentModel.Windows (in Progile.TRIO.EnvironmentModel.Windows.dll)

Inheritance Hierarchy:

Object Progile.TRIO.BaseModel.OnScreenElement Progile.TRIO.BaseModel.BaseScreen Progile.TRIO.EnvironmentModel.Window Progile.TRIO.EnvironmentModel.FileWindow

Constructors

Syntax:

public FileDialog(
	ITester t,
	ISystemHelpers systemHelpers
)

Parameter

Description

t

Type: ITester

The tester interface.

systemHelper

Type: ISystemHelpers

An instance of the ISystemHelpers interface that allows interaction with the SUT operating system.

Methods

Name

Description

Cancels the file dialog.

Opens the selected file or the file from the input path. Returns true if successful, false if a warning is shown. Warning will be confirmed, fileDialog will stay open.

Saves to the selected file or the file from the input path. Returns true if successful, false if a warning is shown. Warning will be confirmed, fileDialog will stay open.

Sets the file name and/or path to the parameter fileNameWithPath

Properties

Name

Description

The button to cancel the FileDialog (see also: Cancel method).

The text box to enter the file name (in currently shown folder) or full file path (for any other folder).

The dropown below the FileName to select the file type as which the file shall be saved. Note: Currently not supported for Win7 and Win8.

The button to open the selected file or the file from the input path (see also: Open method).

The text box to enter the path for the folder to be shown. Note: Currently not supported for Win7. Use FileName instead.

The button to save to the file set in the FileName TextBox (see also: Save method).

A label referring to any warning dialog that might be shown after saving or opening.

Last updated