Dim qtp, qtpRep Set qtp = CreateObject("QuickTest.Application") qtp.Launch Launches QTP qtp.Visible = True Makes QTP visible qtp.New opens a new test Set qtpRep=qtp.Test.Actions("Action1").ObjectRepositories 'Get the current action's Object repostories collection that is Action1's Object repositories collection If qtpRep.Find("C:\Sample test.tsr") = -1 Then 'Verifying whether the shared repository is already present in collection list. For a New test this is not required. This would be more helpful for an existing test qtpRep.Add("C:\Sample test.tsr"),1 End If Set qtp = Nothing
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!