UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

1 lines 20.3 kB
Ext.data.JsonP.Siesta_Recorder_Recorder({"tagname":"class","name":"Siesta.Recorder.Recorder","autodetected":{},"files":[{"filename":"Recorder.js","href":"Recorder.html#Siesta-Recorder-Recorder"}],"mixins":["Siesta.Recorder.Role.CanRecordMouseMoveOnIdle","Siesta.Recorder.Role.CanRecordMouseMovePath","Siesta.Recorder.Role.CanRecordPointOfInterest","Siesta.Recorder.Role.CanRecordScroll","Siesta.Recorder.Role.CanRecordWindowResize"],"members":[{"name":"idleTimeout","tagname":"cfg","owner":"Siesta.Recorder.Role.CanRecordMouseMoveOnIdle","id":"cfg-idleTimeout","meta":{}},{"name":"ignoreCssClasses","tagname":"cfg","owner":"Siesta.Recorder.Recorder","id":"cfg-ignoreCssClasses","meta":{}},{"name":"moveCursorToSelectors","tagname":"cfg","owner":"Siesta.Recorder.Role.CanRecordPointOfInterest","id":"cfg-moveCursorToSelectors","meta":{}},{"name":"recordInitialWindowSize","tagname":"cfg","owner":"Siesta.Recorder.Role.CanRecordWindowResize","id":"cfg-recordInitialWindowSize","meta":{}},{"name":"recordMouseMoveOnIdle","tagname":"cfg","owner":"Siesta.Recorder.Role.CanRecordMouseMoveOnIdle","id":"cfg-recordMouseMoveOnIdle","meta":{}},{"name":"recordMouseMovePath","tagname":"cfg","owner":"Siesta.Recorder.Role.CanRecordMouseMovePath","id":"cfg-recordMouseMovePath","meta":{}},{"name":"recordOffsets","tagname":"cfg","owner":"Siesta.Recorder.Recorder","id":"cfg-recordOffsets","meta":{}},{"name":"recordPointsOfInterest","tagname":"cfg","owner":"Siesta.Recorder.Role.CanRecordPointOfInterest","id":"cfg-recordPointsOfInterest","meta":{}},{"name":"recordScroll","tagname":"cfg","owner":"Siesta.Recorder.Role.CanRecordScroll","id":"cfg-recordScroll","meta":{}},{"name":"recordWindowResize","tagname":"cfg","owner":"Siesta.Recorder.Role.CanRecordWindowResize","id":"cfg-recordWindowResize","meta":{}},{"name":"shouldIgnoreDomElementId","tagname":"cfg","owner":"Siesta.Recorder.Recorder","id":"cfg-shouldIgnoreDomElementId","meta":{}},{"name":"uniqueComponentProperty","tagname":"cfg","owner":"Siesta.Recorder.Recorder","id":"cfg-uniqueComponentProperty","meta":{}},{"name":"uniqueDomNodeProperty","tagname":"cfg","owner":"Siesta.Recorder.Recorder","id":"cfg-uniqueDomNodeProperty","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-Siesta.Recorder.Recorder","short_doc":"This class implements a recorder for user actions. ...","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"parentMixins":[],"requires":[],"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Mixins</h4><div class='dependency'><a href='#!/api/Siesta.Recorder.Role.CanRecordMouseMoveOnIdle' rel='Siesta.Recorder.Role.CanRecordMouseMoveOnIdle' class='docClass'>Siesta.Recorder.Role.CanRecordMouseMoveOnIdle</a></div><div class='dependency'><a href='#!/api/Siesta.Recorder.Role.CanRecordMouseMovePath' rel='Siesta.Recorder.Role.CanRecordMouseMovePath' class='docClass'>Siesta.Recorder.Role.CanRecordMouseMovePath</a></div><div class='dependency'><a href='#!/api/Siesta.Recorder.Role.CanRecordPointOfInterest' rel='Siesta.Recorder.Role.CanRecordPointOfInterest' class='docClass'>Siesta.Recorder.Role.CanRecordPointOfInterest</a></div><div class='dependency'><a href='#!/api/Siesta.Recorder.Role.CanRecordScroll' rel='Siesta.Recorder.Role.CanRecordScroll' class='docClass'>Siesta.Recorder.Role.CanRecordScroll</a></div><div class='dependency'><a href='#!/api/Siesta.Recorder.Role.CanRecordWindowResize' rel='Siesta.Recorder.Role.CanRecordWindowResize' class='docClass'>Siesta.Recorder.Role.CanRecordWindowResize</a></div><h4>Files</h4><div class='dependency'><a href='source/Recorder.html#Siesta-Recorder-Recorder' target='_blank'>Recorder.js</a></div></pre><div class='doc-contents'><p>This class implements a recorder for user actions. It records the events of the window it's attached to.\nIt has a number of options, defining what should be recorder. Since it's JS based, we cannot record\nnative dialog interactions, such as alert, print or confirm etc.</p>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-idleTimeout' class='member first-child inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Recorder.Role.CanRecordMouseMoveOnIdle' rel='Siesta.Recorder.Role.CanRecordMouseMoveOnIdle' class='defined-in docClass'>Siesta.Recorder.Role.CanRecordMouseMoveOnIdle</a><br/><a href='source/CanRecordMouseMoveOnIdle.html#Siesta-Recorder-Role-CanRecordMouseMoveOnIdle-cfg-idleTimeout' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Role.CanRecordMouseMoveOnIdle-cfg-idleTimeout' class='name expandable'>idleTimeout</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>The amount of time for mouse cursor to be idle, after which the\nmoveCursorTo action will be recorded with the target ...</div><div class='long'><p>The amount of time for mouse cursor to be idle, after which the\n<code>moveCursorTo</code> action will be recorded with the target of current cursor position.</p>\n<p>Defaults to: <code>3000</code></p></div></div></div><div id='cfg-ignoreCssClasses' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Recorder.Recorder'>Siesta.Recorder.Recorder</span><br/><a href='source/Recorder.html#Siesta-Recorder-Recorder-cfg-ignoreCssClasses' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Recorder-cfg-ignoreCssClasses' class='name expandable'>ignoreCssClasses</a> : Array<span class=\"signature\"></span></div><div class='description'><div class='short'>An array of CSS class strings, which should be ignored by the recorder as it builds CSS selector locators. ...</div><div class='long'><p>An array of CSS class strings, which should be ignored by the recorder as it builds CSS selector locators. Use\nthis to avoid certain CSS selectors which don't provide any useful distinction about a DOM node</p>\n</div></div></div><div id='cfg-moveCursorToSelectors' class='member inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Recorder.Role.CanRecordPointOfInterest' rel='Siesta.Recorder.Role.CanRecordPointOfInterest' class='defined-in docClass'>Siesta.Recorder.Role.CanRecordPointOfInterest</a><br/><a href='source/CanRecordPointOfInterest.html#Siesta-Recorder-Role-CanRecordPointOfInterest-cfg-moveCursorToSelectors' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Role.CanRecordPointOfInterest-cfg-moveCursorToSelectors' class='name expandable'>moveCursorToSelectors</a> : Array[String]<span class=\"signature\"></span></div><div class='description'><div class='short'>An array of strings with CSS selectors. ...</div><div class='long'><p>An array of strings with CSS selectors. If the mouse is\nmoved upon a target, matching any of these selectors, a <code>moveCursorTo</code> will be recorded.</p>\n\n<p>Used with <a href=\"#!/api/Siesta.Recorder.Role.CanRecordPointOfInterest-cfg-recordPointsOfInterest\" rel=\"Siesta.Recorder.Role.CanRecordPointOfInterest-cfg-recordPointsOfInterest\" class=\"docClass\">recordPointsOfInterest</a> option.</p>\n</div></div></div><div id='cfg-recordInitialWindowSize' class='member inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Recorder.Role.CanRecordWindowResize' rel='Siesta.Recorder.Role.CanRecordWindowResize' class='defined-in docClass'>Siesta.Recorder.Role.CanRecordWindowResize</a><br/><a href='source/CanRecordWindowResize.html#Siesta-Recorder-Role-CanRecordWindowResize-cfg-recordInitialWindowSize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Role.CanRecordWindowResize-cfg-recordInitialWindowSize' class='name expandable'>recordInitialWindowSize</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>Set this option to true to record the single setWindowSize action\nat first launch of the recorder. ...</div><div class='long'><p>Set this option to <code>true</code> to record the single <code>setWindowSize</code> action\nat first launch of the recorder.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-recordMouseMoveOnIdle' class='member inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Recorder.Role.CanRecordMouseMoveOnIdle' rel='Siesta.Recorder.Role.CanRecordMouseMoveOnIdle' class='defined-in docClass'>Siesta.Recorder.Role.CanRecordMouseMoveOnIdle</a><br/><a href='source/CanRecordMouseMoveOnIdle.html#Siesta-Recorder-Role-CanRecordMouseMoveOnIdle-cfg-recordMouseMoveOnIdle' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Role.CanRecordMouseMoveOnIdle-cfg-recordMouseMoveOnIdle' class='name expandable'>recordMouseMoveOnIdle</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>Set this option to true to enable recording of moveCursorTo\naction, when mouse is idle at some point for certain amou...</div><div class='long'><p>Set this option to <code>true</code> to enable recording of <code>moveCursorTo</code>\naction, when mouse is idle at some point for certain amount of time (<a href=\"#!/api/Siesta.Recorder.Role.CanRecordMouseMoveOnIdle-cfg-idleTimeout\" rel=\"Siesta.Recorder.Role.CanRecordMouseMoveOnIdle-cfg-idleTimeout\" class=\"docClass\">idleTimeout</a>)</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-recordMouseMovePath' class='member inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Recorder.Role.CanRecordMouseMovePath' rel='Siesta.Recorder.Role.CanRecordMouseMovePath' class='defined-in docClass'>Siesta.Recorder.Role.CanRecordMouseMovePath</a><br/><a href='source/CanRecordMouseMovePath.html#Siesta-Recorder-Role-CanRecordMouseMovePath-cfg-recordMouseMovePath' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Role.CanRecordMouseMovePath-cfg-recordMouseMovePath' class='name expandable'>recordMouseMovePath</a> : Boolean/String<span class=\"signature\"></span></div><div class='description'><div class='short'>Set this option to true to enable recording of path, the user was\nmoving the mouse. ...</div><div class='long'><p>Set this option to <code>true</code> to enable recording of path, the user was\nmoving the mouse. Be prepared, that this option will generate a lot of data in the playback script.</p>\n\n<p>This option can be a <code>Boolean</code> value or a <code>String</code>. A string can be one of <code>coordinate</code> or <code>query</code>.\nThe <code>coordinate</code> will use page coordinates for mouse move path, the <code>query</code> - normal Siesta queries\n(composite, component and CSS) plus offset. The boolean value <code>true</code> corresponds to string <code>coordinate</code>.</p>\n\n<p>Enabling this option will disable the <a href=\"#!/api/Siesta.Recorder.Recorder-cfg-recordPointsOfInterest\" rel=\"Siesta.Recorder.Recorder-cfg-recordPointsOfInterest\" class=\"docClass\">recordPointsOfInterest</a>\nand <a href=\"#!/api/Siesta.Recorder.Recorder-cfg-recordMouseMoveOnIdle\" rel=\"Siesta.Recorder.Recorder-cfg-recordMouseMoveOnIdle\" class=\"docClass\">recordMouseMoveOnIdle</a> options.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-recordOffsets' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Recorder.Recorder'>Siesta.Recorder.Recorder</span><br/><a href='source/Recorder.html#Siesta-Recorder-Recorder-cfg-recordOffsets' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Recorder-cfg-recordOffsets' class='name expandable'>recordOffsets</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>Set to true to record the offset to each targeted DOM element for recorded\nactions, to make sure the recorded action ...</div><div class='long'><p>Set to <code>true</code> to record the offset to each targeted DOM element for recorded\nactions, to make sure the recorded action can be played back with exact precision.\nNormally Siesta removes the offset of some actions, if target element is reachable at the center point.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-recordPointsOfInterest' class='member inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Recorder.Role.CanRecordPointOfInterest' rel='Siesta.Recorder.Role.CanRecordPointOfInterest' class='defined-in docClass'>Siesta.Recorder.Role.CanRecordPointOfInterest</a><br/><a href='source/CanRecordPointOfInterest.html#Siesta-Recorder-Role-CanRecordPointOfInterest-cfg-recordPointsOfInterest' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Role.CanRecordPointOfInterest-cfg-recordPointsOfInterest' class='name expandable'>recordPointsOfInterest</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>Set this option to true to enable recording of \"points of interest\",\nspecified with the moveCursorToSelectors CSS sel...</div><div class='long'><p>Set this option to <code>true</code> to enable recording of \"points of interest\",\nspecified with the <a href=\"#!/api/Siesta.Recorder.Role.CanRecordPointOfInterest-cfg-moveCursorToSelectors\" rel=\"Siesta.Recorder.Role.CanRecordPointOfInterest-cfg-moveCursorToSelectors\" class=\"docClass\">moveCursorToSelectors</a> CSS selectors</p>\n\n<p>This is useful in lots of scenarios, for example when triggering a menu item to show. You cannot click the menu item right away,\nsince it's hidden until you move the cursor over the top-level menu header.</p>\n\n<p>So if you will add the CSS selector for the top-level menu header in this config, recorder will insert <code>moveCursorTo</code> actions\nevery time mouse hovers it. This makes recording complex scenarios more robust.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-recordScroll' class='member inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Recorder.Role.CanRecordScroll' rel='Siesta.Recorder.Role.CanRecordScroll' class='defined-in docClass'>Siesta.Recorder.Role.CanRecordScroll</a><br/><a href='source/CanRecordScroll.html#Siesta-Recorder-Role-CanRecordScroll-cfg-recordScroll' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Role.CanRecordScroll-cfg-recordScroll' class='name expandable'>recordScroll</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>Set this option to true to enable recording of scroll events. ...</div><div class='long'><p>Set this option to <code>true</code> to enable recording of <code>scroll</code> events.\nThis even occurs, when some element on the page, or the page itself, is scrolled by user.\nSeveral consequent <code>scroll</code> events on the same element will be merged into one <code>scrollTo</code> action.</p>\n\n<p>Note, that when replaying scripts, recorded with this option enabled, you might want to disable\nthe <a href=\"#!/api/Siesta.Project.Browser-cfg-autoScrollElementsIntoView\" rel=\"Siesta.Project.Browser-cfg-autoScrollElementsIntoView\" class=\"docClass\">autoScrollElementsIntoView</a> option,\nas it will be interfering with the recorded actions.</p>\n<p>Defaults to: <code>false</code></p></div></div></div><div id='cfg-recordWindowResize' class='member inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Recorder.Role.CanRecordWindowResize' rel='Siesta.Recorder.Role.CanRecordWindowResize' class='defined-in docClass'>Siesta.Recorder.Role.CanRecordWindowResize</a><br/><a href='source/CanRecordWindowResize.html#Siesta-Recorder-Role-CanRecordWindowResize-cfg-recordWindowResize' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Role.CanRecordWindowResize-cfg-recordWindowResize' class='name expandable'>recordWindowResize</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>Set this option to true to enable recording of window resize events ...</div><div class='long'><p>Set this option to <code>true</code> to enable recording of window resize events</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-shouldIgnoreDomElementId' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Recorder.Recorder'>Siesta.Recorder.Recorder</span><br/><a href='source/Recorder.html#Siesta-Recorder-Recorder-cfg-shouldIgnoreDomElementId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Recorder-cfg-shouldIgnoreDomElementId' class='name expandable'>shouldIgnoreDomElementId</a> : Function<span class=\"signature\"></span></div><div class='description'><div class='short'>If provided, this function will be called to determine if DOM element's\nid can be used as part of the queries, create...</div><div class='long'><p>If provided, this function will be called to determine if DOM element's\nid can be used as part of the queries, created by recorder. Its quite common for various frameworks, to assign\nauto-generated ids to DOM elements. Such ids usually changes very often and should not be used in the queries.</p>\n\n<p>The function should return <code>true</code> if element's id should not be used and will be called with the following arguments:</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>id</span> : String<div class='sub-desc'><p>The id of the DOM element to check</p>\n</div></li><li><span class='pre'>el</span> : HTMLElement<div class='sub-desc'><p>The DOM element itself</p>\n</div></li></ul></div></div></div><div id='cfg-uniqueComponentProperty' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Recorder.Recorder'>Siesta.Recorder.Recorder</span><br/><a href='source/Recorder.html#Siesta-Recorder-Recorder-cfg-uniqueComponentProperty' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Recorder-cfg-uniqueComponentProperty' class='name expandable'>uniqueComponentProperty</a> : Array[String]/String<span class=\"signature\"></span></div><div class='description'><div class='short'><p>A string or an array of strings, containing attribute names\nthat the Recorder will use to identify Ext JS components.</p>\n</div><div class='long'><p>A string or an array of strings, containing attribute names\nthat the Recorder will use to identify Ext JS components.</p>\n</div></div></div><div id='cfg-uniqueDomNodeProperty' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Recorder.Recorder'>Siesta.Recorder.Recorder</span><br/><a href='source/Recorder.html#Siesta-Recorder-Recorder-cfg-uniqueDomNodeProperty' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Recorder.Recorder-cfg-uniqueDomNodeProperty' class='name expandable'>uniqueDomNodeProperty</a> : String<span class=\"signature\"></span></div><div class='description'><div class='short'>A property that will be used to uniquely identify DOM nodes. ...</div><div class='long'><p>A property that will be used to uniquely identify DOM nodes. By default the <code>id</code>\nproperty is used.</p>\n<p>Defaults to: <code>&#39;id&#39;</code></p></div></div></div></div></div></div></div>","meta":{}});