1. A method for recording one or more states related to a user interface, comprising: injecting one or more monitoring wrapper functions into the user interface, at least some of the monitoring wrapper functions comprising: a first monitoring wrapper function configured to record a first state of an event generator; and a second monitoring wrapper function configured to record a second state of the event generator based at least in part on an intent of an action, the second state indicative of the intent of the action; associating a first reference to at least some of the monitoring wrapper functions with an event handler; associating a second reference to at least some of the monitoring wrapper functions, subsequent to the first reference, with the event handler, the second reference comprising one or more sets of instructions between the first reference and the second reference in the event handler; and using at least some of the monitoring wrapper functions to collect information from an event invoked by the event generator, comprising: recording the first state of the event generator prior to invocation of the event; calling one or more event handler functions called by the event; recording the second state of the event generator after completion of the event; and passing the collected information to a recording engine.