-
Notifications
You must be signed in to change notification settings - Fork 0
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).
lively.morphic.EventSimulator provides a basic facility to create DOM events that can be fired using HTMLElement.dispatchEvent(...), typically on $world.
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
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.
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.