Timeouts

As everyone who uses a browser knows, things frequently don't go how you expect. Web sites go down, connections fail, systems and computers experience problems. You might be wondering, how can I make my scripts run reliably in the face of all this unreliability? One way that you can manage the unreliable world is by using Timeouts. Timeouts ensure that items in your script do not take excessive amounts of time and ensure that if things go wrong your script keeps running and returns a result to you.

Timeouts can be configured on any playable item, including requests, navigations, and even Steps. If you configure a timeout for a Step the timeout will govern the whole Step so that the sum of the times for all the items in the Step will be limited to the timeout period.

Configuring a Timeout

To add a timeout, simply open the properties for the item on which you would like to configure the timeout and choose the "Playing" tab:

Click Item

When you configure a timeout, you have the option to control what action is taken when the timeout occurs. These include:

Timeout ActionsDescription
Continue from same positionAborts the currently playing item and continues with the next item.
Abort this StepAborts the currently playing Step and continues with the item following that Step in the script.
Abort HierarchyAborts the whole hierarchy of Steps right to the top level. Continues from the next item in the script following the top level Step containing the item that timed out.
Stop PlayingStops the play sequence altogether. Badboy will stop and wait for manual intervention.
Repeat Containing StepRewinds back to the Step containing the item that timed out and plays the Step again. Note that any loop counters will be reset so that the Step will re-execute its looping behavior as well.

Notes and Limitations
  • Some items cannot be timed out during certain phases of their execution due to their nature. For example, once the Save item has started writing data to the disk it will continue even if a timeout occurs. When the save finishes the timeout will execute.


  • Timeouts have a minimum resolution of 1 second. This means that the actual timeout may occur at plus or minus one second from when you configure it to occur. For low timeouts this may be a significant effect and thus it is not recommended to configure timeouts for less than 2 seconds.

Badboy Documentation Generated on Mon Dec 29 22:28:43 EST 2008