Skip to content

Instantly share code, notes, and snippets.

@ruckuus
Created June 13, 2013 09:43
Show Gist options
  • Save ruckuus/5772504 to your computer and use it in GitHub Desktop.
Save ruckuus/5772504 to your computer and use it in GitHub Desktop.
casper.evaluate(function triggerKeyDownEvent() {
var e = jQuery.Event("keydown");
e.which = 13;
e.keyCode = 13;
jQuery("#questions_holder .question:nth-child(1) .txt-inline-answer").trigger(e);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment