Thanks for clarifying. May be I have misunderstood the whole thing.
What I need to do is that once I have given an input, I need to wait till the app has actually finished processing it, changed its internal state, with possibly the GUI that is visible. I was thinking waiting for idle may solve at least part of my job before I start poking into the app for the view hierarchy, etc.
I think wait for idle may possibly return before the GUI is completely ready but then I will be able to see some circular progress bars. Using this I can check if the GUI is ready.
What is it that will actually help me in this situation?