Absent Member.. disdainfull Absent Member..
Absent Member..
225 views

Object Repository Automation in .vbs file

Jump to solution

I have Windows 7 64-bit running UFT 11.52.  I developed a script in Windows XP QTP 11.0 to check properties and such of all of the objects in an OR.  I also have a VBA macro that collects metrics from all of the archived ORs.  Both of the scripts, vbs and macro, use the Object Repository Automation object "Mercury.ObjectRepositoryUtil".  I just tried to run the vbs file and get the following error: "Microsoft VBScript runtime error: ActiveX component can't create object: 'Mercury.ObjectRepositoryUtil'".  I can still run the macro without any issues.  What is causing this?

0 Likes
1 Solution

Accepted Solutions
Ana_Noncheva Absent Member.
Absent Member.

Re: Object Repository Automation in .vbs file

Jump to solution

Hi,

 

Is the problem reproducible only on the 64-bit machine?

 

Please check following explanation and suggested approach: http://support.openview.hp.com/selfsolve/document/KM1455812

 

Regards,

Ana

 

 

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
0 Likes
6 Replies
Ana_Noncheva Absent Member.
Absent Member.

Re: Object Repository Automation in .vbs file

Jump to solution

Hi,

 

Is the problem reproducible only on the 64-bit machine?

 

Please check following explanation and suggested approach: http://support.openview.hp.com/selfsolve/document/KM1455812

 

Regards,

Ana

 

 

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
0 Likes
Absent Member.. bobando Absent Member..
Absent Member..

Re: Object Repository Automation in .vbs file

Jump to solution

Hello,

 

Besides the possibility of the issue being the usage of the 64-bit Wscript or csript on the machine, there are other reasons for the error. You may want to also refer to this KB article for possible reasons and solutions for the issue:

 

Error: ActiveX component cannot create object: http://support.openview.hp.com/selfsolve/document/KM1017263

 

Thanks

HP | Unified Functional Testing Engineer

[If this post or any other post helps to resolve your issue or query, mark the thread as solved and give KUDOS to the author for their assistance. ]

(Posts and opinions made here are my own and do not reflect the opinions of my employer HP in any way)
0 Likes
Absent Member.. disdainfull Absent Member..
Absent Member..

Re: Object Repository Automation in .vbs file

Jump to solution

http://support.openview.hp.com/selfsolve/document/KM1455812  was the issue.  Now I have to find out how to select a file (repository) to run against since Windows 7 doesn't have "UserAccounts.CommonDialog" anymore.  Thanks for the help!

0 Likes
Absent Member.. vzamoraz Absent Member..
Absent Member..

Re: Object Repository Automation in .vbs file

Jump to solution

If you mean how load repository is in this form

 

Set Repository = CreateObject("Mercury.ObjectRepositoryUtil")
Repository.Load "C:\sample.tsr"

 

HP support
If you find that this or any post resolves your issue, mark it as an accepted solution.


Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

 

0 Likes
Absent Member.. disdainfull Absent Member..
Absent Member..

Re: Object Repository Automation in .vbs file

Jump to solution

No, I know how to load a repository.  I have code that lets the user dynamically select which repository to run the script against.  We have more than one repository.  The "UserAccounts.CommonDialog" uses a Windows GUI to select a file.

0 Likes
Highlighted
Absent Member.. vzamoraz Absent Member..
Absent Member..

Re: Object Repository Automation in .vbs file

Jump to solution

I see,

 

     Is possible for you to share what code did you use  with "UserAccounts.CommonDialog" to do this?

 

     

Best Regards.

 

 

HP support
If you find that this or any post resolves your issue, mark it as an accepted solution.


Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.