| || |
QTP 11 Recovery Scenario
I need help on QTP Recovery scenario, my issue is mentioned herewith.
I have two lines of statement in an action
Line 1 : Browser("").Page("").WinButton("").Click
Line 2 : Browser("").Page("").WinButton("").Click.
Now, on click on each of the button, I get a popup message. For this, I had created a recovery scenarion (using popup window trigger)
Now, when I execute, the code. QTP executes Line 1. A popup comes up, recovery gets fired and QTP handles it. Then QTP executes Line 2. a popup comes up.But QTP DOES NOT handle it.
It looks like QTP first checks for performs the GUI operation, then activates the recovery ONLY when the next GUI operation is called. If I have a GUI operation as the last statement or if I have only non GUI statement at the end. Then the recovery for the last GUI statement is! never called.
By trial and error I came to know that if I write Recovery.Activate statement post the GUI operation, it works even for the last GUI statement.
I dont want to write Recovery.Activate for all GUI statement.
I would appreciate, if someone can tell me how can I achieve this without using Recovery.Activate call for each GUI operation.
Note: I have written a function called HandleDialog and can call it at various places wheren I expect a dialog to come up, but a generic Recovery could have been better.