02-10-2012, 11:28 PM
I tried the following, also with no luck.
(can i even set my variables from a Function call?
(can i even set my variables from a Function call?
Code:
Public Function ImageAccessVariableList ()
'for "O:\QTP Tests\Objec Repository\ImageAccessVariableList.vbs"
Set objQTPApp = CreateObject("QuickTest.Application")
objQTPApp.Launch
objQTPApp.Visible = True
Set objQTPLibraries = objQTPApp.Test.Settings.Resources.Libraries
'objQTPLibraries.RemoveAll
VariableList = "O:\QTP Tests\Objec Repository\ImageAccessVariableList.txt"
If objQTPLibraries.Find(VariableList) <> -1 Then
objQTPLibraries.RemoveAll
Reporter.ReportEvent micFail, "Variable List", "The ImageAccessVariableList.txt file was Not found."
ExitTestIteration
End If
objQTPLibraries.Add (VariableList)
'objQTPLibraries.Add "D:\test2.vbs"
Reporter.ReportEvent micPass, "Variable List", "The ImageAccessVariableList.txt file was found."
Set objQTPApp = Nothing
End Function