Novari-QA
8 years agoFrequent Contributor
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...
- 8 years ago
There are a few ways.
1) Square bracket notation:
var method = "Message";
Log[method]("test");2) $call:
Log.$call("Message", "test");
aqObject.CallMethod(Log, "Message", "test");