GDI Object Leak
I have recently download TestComplete and have started trialling the software. I've create an application in C# designed to test a java app. The test goes well initially, but I have ran into a GDI object leak issue.
GDI Object Count Issue
Below is some sample code of how I'm using the APIs provided by TestComplete.
using AutomatedQA.TestComplete;
using AutomatedQA.script;
private void SelectFull() { int SleepTime = 500; int Retries = 300; for (int i = 0; i < Retries; i++) { var ExistsCheck = Connect.Sys["Process"]("java")["SwingObject"]("PrintDialog", "Print Dialog", -1, 1)["SwingObject"]("JRootPane", "", 0)["SwingObject"]("null.layeredPane") ["SwingObject"]("null.contentPane")["SwingObject"]("JPanel", "", 0)["SwingObject"]("JPanel", "Field List", 0) ["SwingObject"]("JPanel", "Document Format", 0)["SwingObject"]("JRadioButton", "Full", 1)["Exists"]; if (ExistsCheck) break; else System.Threading.Thread.Sleep(SleepTime); } var FullRadioButton = Connect.Sys["Process"]("java")["SwingObject"]("PrintDialog", "Print Dialog", -1, 1)["SwingObject"]("JRootPane", "", 0)["SwingObject"]("null.layeredPane") ["SwingObject"]("null.contentPane")["SwingObject"]("JPanel", "", 0)["SwingObject"]("JPanel", "Field List", 0) ["SwingObject"]("JPanel", "Document Format", 0)["SwingObject"]("JRadioButton", "Full", 1); FullRadioButton["Click"](); }
Currently my stress tests fail after a short period of time. Is there something I'm doing wrong that causes the GDI leak?
I would like to get this sorted before committing to purchasing the software.
Edit: Also if you just close TestComplete test and try to restart it, it can no longer detect the java app. The only solution is to close the java app and TestComplete down. This means the test I'm doing can never be completed as it currently stands.