'************************************************************************************************************************ 'Description: ' 'This example opens OpenText Functional Testing and uses the Folders collection to configure 'the search paths that are used to resolve relative paths. ' 'Assumptions: 'There is no unsaved test currently open in OpenText Functional Testing. 'For more information, see the example for the Test.SaveAs method. '************************************************************************************************************************ Dim qtApp 'As QuickTest.Application ' Declare the Application object variable Dim strPath Dim lngPosition ' Open OpenText Functional Testing Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object qtApp.Launch ' Start OpenText Functional Testing qtApp.Visible = True ' Make the OpenText Functional Testing application visible ' Open a test qtApp.Open "C:\Tests\Test1", True, False ' Open a test in a read-only mode ' Locate "Folder1" and if it's not in the collection - add it strPath = qtApp.Folders.Locate("..\..\Folders\Folder1") ' Locate the "Folder1" folder ' If returned empty string, then we cannot locate the absolute path, so there is nothing to do If strPath <> "" Then If qtApp.Folders.Find(strPath) = -1 Then ' If the folder is not found in the collection qtApp.Folders.Add strPath, 1 ' Add the folder to the collection End If End If Set qtApp = Nothing ' Release the Application object