I was trying to load objects at run time in object repository.My object repositroy gets loaded but when i add object using addobject method I get error saying the google object was not found in repository. I have used the below code:
I have already added browser and page objects to the my shared repository which I am attaching here.
Please guide me how to solve the error
Code:
Set lnk = description.Create
lnk("micclass").value = "Link"
lnk("Name").value = "Web History"
set myrepository = createObject("Mercury.ObjectRepositoryUtil")
myrepository.Load "C:\Program Files\HP\QuickTest Professional\samples\Add_At_Runtime.tsr"
myrepository.AddObject lnk ,Browser("Google"),Page("Google") ' //at this line I get the error
Browser("Google").Page("Google").Link("Web History").Click
msgbox "Done"
I have already added browser and page objects to the my shared repository which I am attaching here.
Please guide me how to solve the error