Hey Ya'll. I usually don't come to forums and ask for help (I like to figure things out on my own!) but I'm completely stumped on this one. What I'm trying to do is load a repository at runtime so I can do some checks against the objects in the repository. I don't actually want to modify the repository at all, just do some simple checks.
Now, according to Mercury (HP) I have to use CreateObject("Mercury.ObjectRepositoryUil") which I did without a hitch. The problem I'm running into is when I try to load a repository. I keep getting a "Load - General Error" message. The error message is really descriptive! *roll eyes* Anyways, can someone here maybe point me in the right direction of what I'm doing wrong? I'd really appreciate any help I can get, thanks in advance!
Here's a little snip of code:
<font class="small">Code:</font><hr /><pre>Set Repository = CreateObject("Mercury.ObjectRepositoryUtil")
Repository.Load "C:\Tests\Repositories\BaseTables.tsr" 'Test fails here, and yes the file exists
Set ObjectList = Repository.GetObjectsByClass("Link") </pre><hr />
I'm using QuickTest Pro 9.1 [img]/images/graemlins/smile.gif[/img]
Set Repository = CreateObject("Mercury.ObjectRepositoryUtil")
Var=Repository.Find "C:\Tests\Repositories\BaseTables.tsr" 'Test fails here, and yes the file exists
If Var <>-1 Then
Actually, I just got it working [img]/images/graemlins/smile.gif[/img] Apparently the testing machine does not have admin rights (Why, I don't know?) and apparently QuickTest Pro won't let me load a file without admin rights.. I gave the account I was using admin rights and now everything works great.
Stupid little quarks like that get on my nerves! Thanks all for the help though [img]/images/graemlins/smile.gif[/img]