Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a variable list to use throughout my scripts
#2
Not Solved
I tried the following, also with no luck.
(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
Reply


Messages In This Thread
RE: Creating a variable list to use throughout my scripts - by mv8167 - 02-10-2012, 11:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Excel template for mapping manual scripts to Automation scripts. ACCBAJPA 0 2,965 09-19-2013, 03:02 PM
Last Post: ACCBAJPA
  Creating Random String SomeIntern 0 5,080 08-21-2013, 09:10 PM
Last Post: SomeIntern
  Problem in creating excel object kriday 1 2,358 07-13-2013, 12:45 PM
Last Post: Ankur
  Creating multiple lines under a header - SAP Fredodo 7 5,839 01-02-2013, 04:54 PM
Last Post: Saleel Prabhu
Shy Resetting a variable list vbs file mv8167 0 2,060 11-03-2012, 12:23 AM
Last Post: mv8167

Forum Jump:


Users browsing this thread: 2 Guest(s)