QTP动态加载对象库

Public Function AddObjectRepository(path)
On Error Resume Next
Dim pos, repath
If instr(path,".tsr") Then
repath = path
else
repath = path & ".tsr"
End If
RepositoriesCollection.RemoveAll()
print repath
RepositoriesCollection.Add (repath) pos = RepositoriesCollection.Find(repath)
If pos<>1 Then
print "cannot find repository"
End If End Function Call AddObjectRepository("D:\hell")
上一篇:Java集合中的Map接口


下一篇:c# 字符串中某个词出现的次数及索引