Open Method

Description

Opens an existing test.

Syntax

Visual Basic
Public Sub Open( _
   ByVal TestPath As String, _
   Optional ByVal OpenInReadOnlyMode As Boolean = False, _
   Optional ByVal SaveCurrent/SaveAll As Boolean = False _
) 

Parameters

TestPathThe full path of the test to open.
OpenInReadOnlyMode

Indicates whether to open the test in read-only mode.

  • True: Opens the test in read-only mode.

  • False: Opens the test in editable mode. (Default)

SaveCurrent

(UFT One versions 2021 R1 and earlier)

Indicates whether to save changes for the selected open test, component, or application area in the currently open solution before opening the specified test.

  • True: Saves the selected open test, component, or application area in the currently open solution.

  • False: Closes the selected open test, component, or application area in the currently open solution without saving. (Default)

SaveAll

(UFT One versions 2022 and later)

Indicates whether to save changes for all open tests, components, and application areas in the currently open solution before opening the specified test.

  • True: Saves all open tests, components, and application areas in the currently open solution.

  • False: Closes all open tests, components, and application areas in the currently open solution without saving. (Default)

Remarks

This method is valid only for tests. To open a business component, use the OpenBusinessComponent method. To open an application area, use the OpenAppArea method.

You can enter an Application.Open statement without an Application.Launch statement. If UFT One is not already running when the Open method is called, UFT One is automatically started.

Example

See Also

Application Object  | Application Members