Forum Discussion
shankar_r
6 years agoCommunity Hero
karkadil wrote:
P.S. Have you changed your voice? :)
Voice is Microsoft Mark voice (text to speech :smileytongue:)
Runner.CallMethod was obsoleted way back in 2013 but It is still supported in TestComplete.
So, Here is the question. I want to read the function from excel and somehow I need to execute that function in TestComplete. Could you please let me know a good way to do this. I really need a standard way of doing this.
tristaanogre
6 years agoEsteemed Contributor
What if you leveraged some JavaScript in some way? Instead of doing some sort of eval or callmethod for the funciton, what if it was class/method? And you would, as part of your execution, call the "require" keyword to bring in the exported class and then execute the method? Something like this.
function (className, methodName){
let localClass = require(className);
let localOBject = new localClass();
localObject[methodName]();
}