"OleObject" does not exist, TestComplete 12.2
So we recently moved from TestComplete version 9 to 12.2. We have a number of tests that read and write data from Excel spreadsheets. I started to have problems with the JScript we use to access the sheets.
This is the line of code that keeps erroring out:
var app = Sys.OleObject("Excel.Application");
And the error message I get is:
You are trying to call the "OleObject" method or property of the "Sys" object that does not exist.
Not sure... the variable assignment is assigning to a property, not necessarily calling a method that returns. So... it could be that you do need some sort of delay.
What I would do is add
Sys.WaitProcess('Excel', 10000)
I did a quick smoke test of this and, yes, there IS a bit of a delay before the application is running. Give this a try and see if this helps.