Constructor
new module:br-test /Utils()
Methods
(static) fire Dom Event(element, event String, characteropt)
Fires a DOM Event in a cross Browser compatible way.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
element |
DOMElement | The DOM Element the Event is fired from |
|
eventString |
String | The Event to be fired without 'on', e.g. 'click', 'keydown' |
|
character |
String |
<optional> |
A character associated with typing events |
(static) fire Key Event(element, event String, key, options)
Fires a DOM KeyboardEvent in a cross Browser compatible way.
Parameters:
Name | Type | Description |
---|---|---|
element |
DOMElement | The DOM Element the Event is fired from |
eventString |
String | The Event to be fired without 'on', e.g. 'keydown' |
key |
String | This parameter is deprecated. Pass in this value as |
options |
Map | A map of values, passed in to the |
(static) fire Mouse Event(element, event String, options)
Fires a DOM MouseEvents in a cross Browser compatible way.
Parameters:
Name | Type | Description |
---|---|---|
element |
DOMElement | The DOM Element the Event is fired from |
eventString |
String | The Event to be fired without 'on', e.g. 'click' |
options |
Map | a map of values, passed in to |
(static) fire Scroll Event(element)
Fires a DOM scroll event in a cross Browser compatible way.
Parameters:
Name | Type | Description |
---|---|---|
element |
DOMElement | The DOM Element the Event is fired from |
(static) get Key Code For Char(character) → {Number}
Returns the Keycode of a letter.
Parameters:
Name | Type | Description |
---|---|---|
character |
String | a single Character to get the Keycode for |
Returns:
keyCode The key code for the specified char.
- Type
- Number
(static) load CSSAnd Attach ToPage(css Fiels)
Attaches CSS files to the test page. Cleaning them up is done via the removeLoadedAndAttachedCSSFromPage
method.
Parameters:
Name | Type | Description |
---|---|---|
cssFiels |
Array | list of css file URLs to be loaded into the test page. |
(static) remove Loaded And Attached CSSFrom Page(css Files)
Attaches CSS files to the test page. Cleaning them up is done via the removeLoadedAndAttachedCSSFromPage
method.
Parameters:
Name | Type | Description |
---|---|---|
cssFiles |
Array | list of css file URLs to be loaded into the test page. |