Submitted by: Konka Ravi Krishna
This code will add the library files:
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim
qtLibraries 'As QuickTest.TestLibraries ' Declare a test's libraries collection variableDim
lngPosition' Open QuickTest
Set
qtApp = CreateObject("QuickTest.Application") ' Create the Application objectqtApp.Launch ' Launch QuickTest
qtApp.Visible = True ' Set QuickTest to be visible
' Open a test and get its libraries collection
qtApp.Open "C:\Test1", False, False ' Open a test
Set
qtLibraries = qtApp.Test.Settings.Resources.Libraries ' Get the libraries collection object' Add Utilities.vbs if it's not in the collection
If
qtLibraries.Find("C:\sai1.vbs") = -1 Then ' If the library cannot be found in the collectionqtLibraries.Add "C:\sai1.vbs", 1 ' Add the library to the collection
End If
Above answer was rated as good by the following members:
dasiga999