Losing recognition of Java Swing objects during test run; top-level window becomes SunAwtFrame
I've tried running our automated tests in TestComplete 11 for the first time, and the test run gets a few tests in and then fails all the remaining tests.
After watching it a few times, I've realized that TestComplete is losing the ability to recognize the Java objects (SwingObject type) in our application after opening a particularly large file in the application.
When the application starts, TestComplete correctly recognizes all the Swing objects. A few tests on smaller files are completed successfully. Then, a larger file is opened and at that point, TestComplete fails to recognize the application objects. I've attached a screenshot. Basically, the top-level Swing window recognition goes away and the window is only recognized as type Window("SunAwtFrame").
Any suggestions would be appreciated.
Ended up opening a support case. The solution was to increase the value of Project Properties > Open Applications > Method invoke timeout.
My test scripts were accessing internal application methods, and the initial setting was 3000. When the application was working on a big file, it failed to respond within 3 seconds. This caused the Swing object recognition failures.
I've increased the setting to 60000 in my projects for now, and this has gotten the test suite running again.