Add Method

Description

Adds an object repository file to the specified position in the collection.

Syntax

Visual Basic
Public Sub Add( _
   ByVal ObjectRepositoryPath As String, _
   Optional ByVal Position As Long = -1 _
   Optional ByVal IgnorePathValidation As Boolean = False							
) 

Parameters

ParameterDescription
ObjectRepositoryPathThe path to the shared object repository file you want to add. You can specify a complete or relative path.
Position

The position in which you want to add the shared object repository.

If you do not specify a position, the object repository is added to the end of the list (position=-1).

IgnorePathValidation

Supported in UFT One versions 2021 R1 and later.

Specify whether to refrain from validating the path to the shared object repository file.

Possible values:

  • True: UFT One skips the validation. Use this value when you want to create and save the file to a path that does not exist yet.

  • False: (Default value) UFT One validates the path before adding the file.

Example

Associate an Object Repository with an Action

See Also

ObjectRepositories Collection