Solved
Forum Discussion
tristaanogre
9 years agoEsteemed Contributor
I think, but I'm not sure, that this is because you are passing a native JavaScript array through to a function that comes from an object in the AUT. While it works just fine through the chrome console (because you are accessing the JavaScript process directly), going through the TestComplete code, I think, requires that array to be passed, not as a native JavaScript array but as a variant array.
Try converting your array first using something like:
function ConvertJScriptArray(JScriptArray) { // Uses the Dictionary object to convert a JScript array var objDict = Sys.OleObject("Scripting.Dictionary"); objDict.RemoveAll(); for (var i in JScriptArray) objDict.Add(i, JScriptArray[i]); return objDict.Items(); }
Again, I could be wrong, but that seems to be the best bet.