Get a link to the Quality Center ISupportCopyPaste API using QuickTest Pro

Quality Center OTA API provides interfaces such as ISupportCopyPaste (copy / paste data using the clipboard). The documented way to get a link to an implemented interface:

'Declare a variable to hold the reference for the interface 
Dim bf As IBaseFactory2 
' By assigning the implementing object reference to the 
' IBaseFactory2 type variable, the type is cast to that of the 
' implemented interface. The new variable is a reference to the 
' IBaseFactory2 interface within the parent object. 
' tdc is the global TDConnection object. 
Set bf = tdc.BugFactory

The above code is in VB (which I don't want to use).
However, QTP does not allow "As" in the Dim statement.
Can anyone tell me how to get the link using QTP?
Any other solution to this problem? for example: using Python Win32

+3
source share
2 answers

, QTP " As Dim", , QTP VBScript VB, As - VB (VBScript ).

OTA QTP, QCUtil, QTP (. QTP ).

QCUtil , , , COM, OTA ( , , VB, VBScript, ++ .NET, Python).

VBScript, OTA VBScript CreateObject ( CreateObject OTA ).

+2

OTA , , IDispatch.

; vbscript ​​ISupportCopyPaste. , ISupportCopyPaste, .

0

Source: https://habr.com/ru/post/1786853/


All Articles