You are looking for synthetic events. This is pretty tricky. The following library will take care of this for you ... http://jupiterjs.com/news/syn-a-standalone-synthetic-event-library
Here is sample code using their lib
Syn.click( {},'hello' ) .type( 'Hello World' ) .delay() //waits 600ms seconds by default .drag( $('#trash') , function() { ok( $('#hello').length == 0, "removed hello" ) });
source share