Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading objects in qtp at run time
#1
Not Solved
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:


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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,589 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  HI, i'm having a run time error ,please help? Awzar 0 2,389 01-24-2015, 06:52 AM
Last Post: Awzar
  Run time error RPS_QTP 1 2,328 10-04-2012, 01:57 PM
Last Post: krr
  Run time Data table to QC sshukla12 1 3,570 04-02-2012, 02:45 PM
Last Post: sshukla12
  Getting run time errors on the screenshots while recording with QTP Radmila Kukolj 2 3,764 12-14-2011, 04:00 AM
Last Post: Radmila Kukolj

Forum Jump:


Users browsing this thread: 1 Guest(s)