(older archive entries before 2007 are not shown here, but included in the onsite-search)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[QF-Test] Closing an unknown modal dialog
I am writing exception handling for my script and I have a challenge that I would like some comments on.
Sometimes during testrun I get an unexpected modal dialog. It is not same dialog every time and it does not happen at the same script node, so that makes it difficult using a normal try-catch. I am therefore trying to implement catch nodes in my dependencies.
When the dialog appears I want my script (in the dependency catch node) to close the dialog and after that close the mainwindow (not the whole application) and continue with the next testcase. The mainwindow cannot be closed until I get rid of the modal dialog.
But how do I close the modal dialog when I don't know which component it is? Is it possible to make a Jython script that closes the active modal dialog? Or do I have to identify every possible modal dialog that could appear and try closing all of them with try-catch (not a very beautiful solution).
Another problem I am facing is closing windows with Alt-F4 or pressing the X in the corner.
When I record I get the steps:
Or (for the X)
But nothing seems to happen when I replay?
Capgemini Danmark A/S, Registered office: Gentofte, Reg.No. 25606965