01-21-2013, 07:32 AM
Hi..
I had never used "Object state" recovery scenario.
I thot of learning it.
So, in the sample flight reservation - windows based - application.
I recorded the below script.
As you know, only if we had inserted order, Delete Order will be enabled.
I deleted the order. Now it is disabled.
I added a recovery scenario for the Delete Order button.
These are properties.
text:=&Delete Order
native class:=Button
enabled:=False
Recovery action is a function call with a msgbox saying "Hi"
I added the recovery scenario the test and activated "on every step"
I commented all the code except the last line.
When i ran this, it kept showing an error that "object is disabled"
Recovery scenario does not seem to be activated.
Can you please let me know what mistake i do here?
I had never used "Object state" recovery scenario.
I thot of learning it.
So, in the sample flight reservation - windows based - application.
I recorded the below script.
Code:
Window("Flight Reservation").ActiveX("MaskEdBox").Type "121213"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Denver"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Frankfurt"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "vins"hello"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinButton("Delete Order").Click
As you know, only if we had inserted order, Delete Order will be enabled.
I deleted the order. Now it is disabled.
I added a recovery scenario for the Delete Order button.
These are properties.
text:=&Delete Order
native class:=Button
enabled:=False
Recovery action is a function call with a msgbox saying "Hi"
I added the recovery scenario the test and activated "on every step"
I commented all the code except the last line.
Code:
Window("Flight Reservation").WinButton("Delete Order").Click
When i ran this, it kept showing an error that "object is disabled"
Recovery scenario does not seem to be activated.
Can you please let me know what mistake i do here?