How to trigger an `input` field's `newline` action in an Ember.js acceptance test?
问题 I had thought that keyEvent('.my input', 'keypress', 13); would trigger the input's newline action, but it doesn't seem to. It seems others have had a similar problem Is there any other/better way to trigger the newline action from my acceptance test? 回答1: Looks like triggering a keydown then a keyup event (instead of a keypress ) does the trick: keyEvent('.my input', 'keydown', 13); keyEvent('.my input', 'keyup', 13); 来源: https://stackoverflow.com/questions/37868688/how-to-trigger-an-input