The test script is a separate process. In order to have access to the QWidget-specific calls, I would need a way to convert the hwnd obtained through the WinAPI into a QWidget object. If there is a way to do this, I would be ecstatic.
From outside the running Qt app, I get the hwnd to the app through the EnumWindows WinAPI call, then feed this into EnumChildWindows to iterate through all the QWidgets in the app.
With the control's hwnd in hand, I can get things like the Windows class name (QWidget), as well as simulate user actions by sending windows messages like WM_LBUTTONDOWN / WM_LBUTTONUP.
What I'm having trouble with is getting data out of the control. Froglogic has a testing program called Squish with a spy feature than can attach to a running app and explore the entire control tree / properties etc. All I really need is the control text.
Any help appreciated,
Michael
Bookmarks