Created
June 7, 2016 15:17
-
-
Save brian-mann/0c79a2b98c17d2dfb7f0461eb2b59ad5 to your computer and use it in GitHub Desktop.
arrowdown custom command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cypress.addChildCommand("arrowdown", function($el){ | |
| var evt = new Event("keydown", { | |
| bubbles: true, | |
| cancelable: true, | |
| altKey: false, | |
| ctrlKey: false, | |
| metaKey: false, | |
| shiftKey: false, | |
| location: 0, | |
| charCode: 0, | |
| detail: 0, | |
| keyCode: 40, | |
| which: 40 | |
| }) | |
| $el.get(0).dispatchEvent(evt) | |
| return $el | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment