Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object State - Recovery Scenario
#1
Not Solved
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"
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?
Reply
#2
Not Solved
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Collecting Objects And Object State At Runtime zunebuggy 3 1,716 11-22-2017, 02:37 PM
Last Post: supputuri
  Create Video of a scenario shivangshah 0 1,231 01-30-2017, 07:45 PM
Last Post: shivangshah
  Default state of new action aparajita 1 2,333 08-25-2015, 12:11 AM
Last Post: aparajita
  Default recovery scenario TurtleRock 1 2,914 05-30-2014, 02:17 PM
Last Post: Tarik Sheth
  Edit Recovery Scenario skegler 0 3,283 03-05-2014, 10:40 PM
Last Post: skegler

Forum Jump:


Users browsing this thread: 1 Guest(s)