Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Handling Object Repositories dynamically inside For Loop
#1
Not Solved
Dim obj_rep, obj_col, repository_no, obj_count
Code:
For repository_no = 1 to 10

Set obj_rep = CreateObject("Mercury.ObjectRepositoryUtil")
obj_rep.Load "E:\QTP\user_registration.tsr"

Set obj_col = obj_rep.GetAllObjects()
obj_count = obj_col.Count
Print obj_count

Set obj_col = Nothing
Set obj_rep = Nothing

Next


When I run the above script, only once the obj_count is getting printed. The obj_count for remaining 9 repositories are not printed.
How to overcome this?
Reply


Messages In This Thread
Handling Object Repositories dynamically inside For Loop - by danny2012 - 07-06-2012, 07:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Difference between error handling and exception handling venkatbatchu 6 26,587 12-11-2018, 05:11 PM
Last Post: smitapawar610
  SAPLIST is not recognised inside SAPTable mann 0 1,246 02-26-2018, 11:24 AM
Last Post: mann
  UFT - Check a checkbox inside a table cell sara- 0 5,706 02-02-2015, 08:07 PM
Last Post: sara-
  Declaring Extern in QTP to call a DDE function inside a DLL **SOLVED** ramuk 1 3,438 06-07-2012, 07:57 PM
Last Post: ramuk
Exclamation Objects inside Pop up window not recognised. falvi 12 10,667 04-12-2012, 11:26 AM
Last Post: falvi

Forum Jump:


Users browsing this thread: 2 Guest(s)