keyEvent (selector, type, keyCode) RSVP.Promisepublic
Simulates a key event, e.g. keypress, keydown, keyup with the desired keyCode
Example:
keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() {
// assert something
});
Parameters:
-
selector
String - jQuery selector for finding element on the DOM
-
type
String - the type of key event, e.g. `keypress`, `keydown`, `keyup`
-
keyCode
Number - the keyCode of the simulated key event
Please login to continue.