RepositoriesCollection Object in UFT

A test can have multiple shared object repositories associated with it. We can manage such repositories using RepositoriesCollection object. RepositoriesCollection object allows you to manage the shared object repositories at run time. You can associate and remove the associated repositories at run time using this object. Here is the example that illustrates how to use RepositoriesCollection object.
 
'Remove all associated repositories
RepositoriesCollection.RemoveAll()

'Add the repository with name r1.tsr
RepositoriesCollection.Add("r1.tsr")

'Print total number of associated repositories
msgbox "Total no of associated repositories -> " & RepositoriesCollection.Count

'get the name of the repository file
msgbox "Name of the first repository -> " & RepositoriesCollection.Item(1)

'Find the position of the specific object repository
position = RepositoriesCollection.Find("r1.tsr")

'Add the repository with name r2.tsr
RepositoriesCollection.Add("r2.tsr")

'Print total number of repositories
msgbox "Total no of associated repositories -> " & RepositoriesCollection.Count

'Move the repository from position 1 to position 2
RepositoriesCollection.MoveToPos 1,2

'Remove the repository at specific position
RepositoriesCollection.Remove(position)                     

Web development and Automation testing

solutions delivered!!