Matteo Scandolo | 79e86d6 | 2016-06-15 16:42:12 -0700 | [diff] [blame] | 1 | /** |
2 | * Collection of helpers for xos tests | ||||
3 | */ | ||||
4 | |||||
5 | const clickElement = function (el){ | ||||
6 | var ev = document.createEvent("MouseEvent"); | ||||
7 | ev.initMouseEvent( | ||||
8 | "click", | ||||
9 | true /* bubble */, true /* cancelable */, | ||||
10 | window, null, | ||||
11 | 0, 0, 0, 0, /* coordinates */ | ||||
12 | false, false, false, false, /* modifier keys */ | ||||
13 | 0 /*left*/, null | ||||
14 | ); | ||||
15 | el.dispatchEvent(ev); | ||||
16 | }; | ||||
17 | console.log('---------------------- Test Helpers Loaded!! -----------------------'); |