the link above points to angular UT, not e2e, you can trigger the dom event in e2e through your api request, for example
element('#something_id').query(function(el, done){ var evt = document.createEvent('Event'); evt.initEvent('focus', false, true); el[0].dispatchEvent(evt); done(); });
source share