Forum Discussion
tristaanogre
8 years agoEsteemed Contributor
Not sure about promises... but you're using arrow functions... based upon the help, they are not supported.
https://support.smartbear.com/testcomplete/docs/scripting/specifics/javascript.html
Unsupported Features
-
JavaScript in TestComplete does not support the ECMAScript Internationalization API.
-
JavaScript in TestComplete does not support arrow functions. For example, the following code will cause a syntax error:
// Arrow functions are not supported
var f = x => x > 0; // Syntax error!I'm not familiar with what promises are... but automated scripting in TestComplete is single-threaded... everything is run synchronously... so it actually makes sense that Promises are going to cause TestComplete to have a hissy fit.
- KSQian8 years agoContributor
They're supported now in 12.4!
const cheers = text=>Log.Message(text)
cheers("weeeeee!")
- tristaanogre8 years agoEsteemed Contributor
Hrm... than the help is outdated and needs an update...
In any case, the asynchronous nature of promises is probably where things go wonky...