GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  QTP

 Print  |  
Question:  How to use automation object to load the library files in QTP. I tried to use this stmt" set App = createobject("Quicktest.Application")
App.Test.Settings.Resources.Libraries.Add ("F:QTPrepository.vbs"),1 ".could u pls help how to add it by script itself? what is executefile concept? is it workaround to my question?




March 03, 2007 03:50:36 #8
 manish   Member Since: Visitor    Total Comments: N/A 

RE: How to use automation object to load the library f...
 
Hi ,
This is Gre8 Script thank
I have changed it as per my requirement to add file to same Script

Dim qtApp
Dim qtLibraries

Set qtApp = CreateObject("QuickTest.Application")
Set qtLibraries = qtApp.Test.Settings.Resources.Libraries ' Get the libraries collection object

If qtLibraries.Find("C:sai1.vbs") = -1 Then ' If the library cannot be found in the collection
ExecuteFile  "C:sai1.vbs"
End If

Call test1()

Function In File Sai1.vbs
Function test1()
MsgBox "Hi Manish"
End Function



     

 

Back To Question