Skip to content
fbornhofen edited this page Mar 10, 2012 · 1 revision

Event automation

Being able to programmatically record and replay events will enable us to write better tests and allow for scripting (e.g. in tutorials).

Replaying events

lively.morphic.EventSimulator provides a basic facility to create DOM events that can be fired using HTMLElement.dispatchEvent(...), typically on $world.

Scripting events

Event library/DSL

On top of EventSimulator, we could have an internal DSL for events instead of putting up with DOM event descriptions. Think

EventSimulator.click().at(pt(100,100)).leftButton().altKey().sendTo(aMorph);

or something similar

Higher level scripting

Test tools and libraries for GUI toolkits (like dogtail for gtk) allow for high level scripting of GUIs. Calling

$world.clickOn('ObjectEditor');

might look up a Morph in the scenegraph and send a click event to it. This could be generalized as well:

$world.clickOn({textString: 'ObjectEditor'})

(think "something like jQuery on top of Morphic").

This would be a valuable tool for UI integration and acceptance tests.

Recording events

In Webwerkstatt, we are already able to log events (source?? Alex?). We might think of serializing event descriptions and thus be able to record macros or share events across the network.