07-12-2012, 04:30 PM
Code:
Dim obj_rep, obj_col, repository_no, obj_count
For repository_no = 1 to 10
Set obj_rep = CreateObject("Mercury.ObjectRepositoryUtil")
obj_rep.Load obj_repository_file_path & current_screen & ".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?
obj_repository_file_path - would be taken from environment file.
current_screen - would be taken from the OR folder at run time based on a condition.