I am using QTP to automate a Java Application.
With the following code, I am trying to maximize a JavaWindow which is simply taken from QTP's record and playback.
This code is working fine in most of the cases. But, at some rare cases, it turned out to be a failure. QTP is throwing an error as "The operation can not be performed"
I stopped the QTP execution and tried to record one more time for the JavaWindow to get maximized. Surprisingly, QTP is not generating any code for any sort Window events to the JavaWindow. If I do any close or click in any of the elements in that window, then it is working fine.
Why this strange behavior ? How to avoid these sort of errors ?