![]() |
Object State - Recovery Scenario - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Object State - Recovery Scenario (/Thread-Object-State-Recovery-Scenario) |
Object State - Recovery Scenario - vIns - 01-21-2013 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. Code: Window("Flight Reservation").ActiveX("MaskEdBox").Type "121213" 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? RE: Object State - Recovery Scenario - Ankesh - 01-21-2013 Looking at the error that you are receiving, i feel this is a sync issue. Did you try using a wait after clicking on insert order? Regards, Ankesh |