--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phantomjs+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
// This is a workaround alternative to this.click(link)
// It does not trigger a resize event. (1 test)
function myclick( test, casper, link ) {
test.assertExists(link);
test.comment('myclick: send click event to ' + link);
casper.evaluate(function(link) {
var evt = document.createEvent('MouseEvents');
evt.initEvent('click', true, false);
document.querySelector(link).dispatchEvent(evt);
}, link);
}