Forum Discussion

pjageronimo's avatar
pjageronimo
Contributor
12 years ago

How to pass a project variable to TestExecute COM

Hello, is it possible to pass a project variable to a vb.net com application? Have been reading the help file and threads but haven't had any luck on this one.



Thanks -- Paul

  • Hi Paul,


     


    Is the following code what you are looking for?


     




     ' Create an application object


      Set TestCompleteApp = CreateObject("TestComplete.TestCompleteApplication")


     


      ' Obtain an integration object


      Set IntegrationObject = TestCompleteApp.Integration


     


      ' Obtain the Project program object


      Set ProjectObj = IntegrationObjectj.GetObjectByName("Project")


     


      ' Obtain the variable collection


      Set VarCol = ProjectObj.Variables


      


      '...



  • Yep, actually saw this one in SQAForums, i just don't know how to process the variable collection... Can you provide a sample code that will process the collection?