Forum Discussion

karkadil's avatar
karkadil
Valued Contributor
11 years ago

Why Runner.CallMethod is obsolete?

Hi everyone,



I have just noticed that Runner.CallMethod became obsolete in TC 9 and I have a big concern here.



Since circular references are still not allowed in JScript, Runner.CallMethod is the only way how we can call functions between 2 units. USEUNIT doesn't help here.



If it is possible, I'd like to know SmartBear's official position regarding this question.



Thank you,

4 Replies

  • Hi

    I'd also be interested in SmartBears official position on Runner.CallMethod esp when callMethod was going to stop working. I have a framework that depends on it in a few places and the alternatives I've tried don't work nearly as well as using callMethod.



    This mostly boils down to exceptioins being logged and being handlable when a function is called using Runner.CallMethod but if the same function is injected via a parameter the exceptions cannot be caught in the calling function. I am using JScript.



    Thanks

    John

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Guys,


     


    Sorry for not replying to you earlier.


     


    Runner.CallMethod is marked as obsolete. However, it doesn't mean that we are going to remove it from TestComplete. It will persist in the product and provide the backward compatibility.


    However, we recommend that you consider starting using the suggestions listed in the "CallMethod Method" article to go away from the method.

  • karkadil's avatar
    karkadil
    Valued Contributor
    Hi Tanya,



    Unfortunately, there is no way how to overcome the circullar reference problem I described in the 1st message.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)


    Hi Gena,


     


    This is an exception. Anyway, CallMethod is still available in the product. You know that TestComplete still supports many obsolete methods.