Forum Discussion

Novari-QA's avatar
Frequent Contributor
7 years ago

Call function from string value JavaScript

I was hoping that TestComplete offered a method in which we can dynamically call specific functions based off of a string variable.   For example: This is how I would do it in C#. Unfortunately I a...
  • HKosova's avatar
    7 years ago

    There are a few ways.


    1) Square bracket notation:

    var method = "Message";

    2) $call:

    Log.$call("Message", "test");

    3) aqObject.CallMethod:

    aqObject.CallMethod(Log, "Message", "test");