| || |
Dynamic Function Call in TestComplete
Testcomplete doesn't seem to support the vbscript command 'GetRef', is there a similar command in Testcomplete? I trying to use the piece of code below to call a function using a variable as the function name (keyword), this would work in QTP. VBA has a similar command called 'CallByName'
Set oFunction = GetRef(keyword)
If IsObject(oFunction) Then
bResult = oFunction(Parmaters)
Re: Dynamic Function Call in TestComplete
Use the Eval function:
<font class="small">Code:</font><hr /><pre>...
bResult = Eval(keyword & "(" & parameter1 & ", " & parameter2 & ")")