smalliv407 发表于 2014-5-19 22:58:57

vb.net 如何调用REPOSITORYUTILLib.ObjectRepositoryUtil

vbs里 Set ObjectRepository = CreateObject("Mercury.ObjectRepositoryUtil")
ObjectRepository.Load “D:\QTPobjectLib\test.tsr”
Set TOCollection =ObjectRepository.GetAllObjects()
这段代码在vb.net中如何实现
我的代码如下:
引入Interop.REPOSITORYUTILLib.dll
Dim ObjectRepository As REPOSITORYUTILLib.ObjectRepositoryUtil
Dim obj As REPOSITORYUTILLib.DispITOCollection
ObjectRepository = New REPOSITORYUTILLib.ObjectRepositoryUtil
obj = New REPOSITORYUTILLib.TOCollection
ObjectRepository.Load("D:\QTPobjectLib\test.tsr")
obj = ObjectRepository.GetAllObjects()
代码每到最后GetAllObjects()function的时候就报错。
大家看看有没有能解决我的问题的。

lsekfe 发表于 2014-5-20 11:47:02

vbs里 Set ObjectRepository = CreateObject("Mercury.ObjectRepositoryUtil")
ObjectRepository.Load “ ...
smalliv407 发表于 2014-5-19 22:58 http://bbs.51testing.com/images/common/back.gif


    支持下原创~~

smalliv407 发表于 2014-5-22 17:00:44

再顶起下,等待回复中。。。。。
页: [1]
查看完整版本: vb.net 如何调用REPOSITORYUTILLib.ObjectRepositoryUtil