siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
1 lines • 35.4 kB
JavaScript
Ext.data.JsonP.Siesta_Test_UserAgent_Mouse({"tagname":"class","name":"Siesta.Test.UserAgent.Mouse","autodetected":{},"files":[{"filename":"Mouse.js","href":"Mouse.html#Siesta-Test-UserAgent-Mouse"}],"members":[{"name":"moveCursorBetweenPoints","tagname":"cfg","owner":"Siesta.Test.UserAgent.Mouse","id":"cfg-moveCursorBetweenPoints","meta":{}},{"name":"click","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-click","meta":{}},{"name":"doubleClick","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-doubleClick","meta":{}},{"name":"dragBy","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-dragBy","meta":{}},{"name":"dragTo","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-dragTo","meta":{}},{"name":"mouseDown","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-mouseDown","meta":{}},{"name":"mouseUp","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-mouseUp","meta":{}},{"name":"moveCursorAlongPath","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-moveCursorAlongPath","meta":{}},{"name":"moveCursorBy","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-moveCursorBy","meta":{}},{"name":"moveCursorTo","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-moveCursorTo","meta":{}},{"name":"moveMouseBy","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-moveMouseBy","meta":{}},{"name":"moveMouseTo","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-moveMouseTo","meta":{}},{"name":"rightClick","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-rightClick","meta":{}},{"name":"wheel","tagname":"method","owner":"Siesta.Test.UserAgent.Mouse","id":"method-wheel","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-Siesta.Test.UserAgent.Mouse","component":false,"superclasses":[],"subclasses":[],"mixedInto":["Siesta.Test.Browser"],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Mixed into</h4><div class='dependency'><a href='#!/api/Siesta.Test.Browser' rel='Siesta.Test.Browser' class='docClass'>Siesta.Test.Browser</a></div><h4>Files</h4><div class='dependency'><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse' target='_blank'>Mouse.js</a></div></pre><div class='doc-contents'><p>This is a mixin, providing the mouse events simulation functionality.</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-moveCursorBetweenPoints' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-cfg-moveCursorBetweenPoints' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-cfg-moveCursorBetweenPoints' class='name expandable'>moveCursorBetweenPoints</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>True to move the mouse cursor between for example two clicks on\n separate elements (for better visual experience) ...</div><div class='long'><p>True to move the mouse cursor between for example two clicks on\n separate elements (for better visual experience)</p>\n<p>Defaults to: <code>true</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-click' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-click' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-click' class='name expandable'>click</a>( <span class='pre'>[el], [callback], [scope], [options], [offset]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a mouse click in the center of the specified DOM element,\nor at current cursor position if ...</div><div class='long'><p>This method will simulate a mouse click in the center of the specified DOM element,\nor at current cursor position if no target is provided.</p>\n\n<p>Note, that it will first calculate the central point of the specified element and then\nwill pick the top-most DOM element from that point. For example, if you will provide a grid row as the <code>el</code>,\nthen click will happen on top of the central cell, and then will bubble to the row itself.\nIn most cases this is the desired behavior.</p>\n\n<p>Example:</p>\n\n<pre><code> t.click(t.getFirstRow(grid), function () { ... })\n</code></pre>\n\n<p>The 1st argument for this method can be omitted. In this case, Siesta will use the current cursor position:</p>\n\n<pre><code> t.click(function () { ... })\n</code></pre>\n\n<p>This method returns a <code>Promise</code> which is resolved once the click has completed:</p>\n\n<pre><code> t.click('#someEl').then(function () {\n return t.click('#anotherEl')\n }).then(function () {\n return t.click('#yetAnotherEl')\n })\n</code></pre>\n\n<p>See also <a href=\"#!/api/Siesta.Test-method-chain\" rel=\"Siesta.Test-method-chain\" class=\"docClass\">chain</a> method for slimer chaining notation.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> (optional)<div class='sub-desc'><p>One of the <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> values to convert to DOM element</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>A function to call after the click</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>The scope for the callback</p>\n</div></li><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Any options to use for the simulated DOM event</p>\n</div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"]\nto click in the center horizontally and 2px from the bottom edge.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the click has completed</p>\n</div></li></ul></div></div></div><div id='method-doubleClick' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-doubleClick' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-doubleClick' class='name expandable'>doubleClick</a>( <span class='pre'>[el], [callback], [scope], [options], [offset]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a mouse double click in the center of the specified DOM/Ext element,\nor at current cursor p...</div><div class='long'><p>This method will simulate a mouse double click in the center of the specified DOM/Ext element,\nor at current cursor position if no target is provided.</p>\n\n<p>Note, that it will first calculate the centeral point of the specified element and then\nwill pick the top-most DOM element from that point. For example, if you will provide a grid row as the <code>el</code>,\nthen click will happen on top of the central cell, and then will bubble to the row itself.\nIn most cases this is the desired behavior.</p>\n\n<p>Example:</p>\n\n<pre><code> t.doubleClick(t.getFirstRow(grid), function () { ... })\n</code></pre>\n\n<p>The 1st argument for this method can be omitted. In this case, Siesta will use the current cursor position:</p>\n\n<pre><code> t.doubleClick(function () { ... })\n</code></pre>\n\n<p>This method returns a <code>Promise</code> which is resolved once the double click has completed</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> (optional)<div class='sub-desc'><p>One of the <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> values to convert to DOM element</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>A function to call after click.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>The scope for the callback</p>\n</div></li><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Any options to use for the simulated DOM event</p>\n</div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"]\nto click in the center horizontally and 2px from the bottom edge.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the double click has completed</p>\n</div></li></ul></div></div></div><div id='method-dragBy' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-dragBy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-dragBy' class='name expandable'>dragBy</a>( <span class='pre'>source, delta, [callback], [scope], options, dragOnly, [offset]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a drag and drop operation from a point (or DOM element) and move by a delta. ...</div><div class='long'><p>This method will simulate a drag and drop operation from a point (or DOM element) and move by a delta.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>source</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a><div class='sub-desc'><p><a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> value as the drag starting point</p>\n</div></li><li><span class='pre'>delta</span> : Array<div class='sub-desc'><p>The amount to drag from the source coordinate, expressed as [x,y]. E.g. [50, 10] will drag 50px to the right and 10px down.</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>To run this method async, provide a callback method to be called after the drag operation is completed.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>the scope for the callback</p>\n</div></li><li><span class='pre'>options</span> : Object<div class='sub-desc'><p>any extra options used to configure the DOM event</p>\n</div></li><li><span class='pre'>dragOnly</span> : Boolean<div class='sub-desc'><p>true to skip the mouseup and not finish the drop operation.</p>\n</div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"] to click in the center horizontally and 2px from the bottom edge.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-dragTo' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-dragTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-dragTo' class='name expandable'>dragTo</a>( <span class='pre'>source, target, [callback], [scope], options, dragOnly, [sourceOffset], [targetOffset]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a drag and drop operation between either two points or two DOM elements. ...</div><div class='long'><p>This method will simulate a drag and drop operation between either two points or two DOM elements.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>source</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a><div class='sub-desc'><p><a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> value for the drag starting point</p>\n</div></li><li><span class='pre'>target</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a><div class='sub-desc'><p><a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> value for the drag end point</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>To run this method async, provide a callback method to be called after the drag operation is completed.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>the scope for the callback</p>\n</div></li><li><span class='pre'>options</span> : Object<div class='sub-desc'><p>any extra options used to configure the DOM event</p>\n</div></li><li><span class='pre'>dragOnly</span> : Boolean<div class='sub-desc'><p>true to skip the mouseup and not finish the drop operation.</p>\n</div></li><li><span class='pre'>sourceOffset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the source. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"] to click in the center horizontally and 2px from the bottom edge.</p>\n</div></li><li><span class='pre'>targetOffset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"] to click in the center horizontally and 2px from the bottom edge.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-mouseDown' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-mouseDown' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-mouseDown' class='name expandable'>mouseDown</a>( <span class='pre'>el, options, [offset], [callback], [scope]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a mousedown event in the center of the specified DOM element,\nor at current cursor position...</div><div class='long'><p>This method will simulate a mousedown event in the center of the specified DOM element,\nor at current cursor position if no target is provided.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a><div class='sub-desc'>\n</div></li><li><span class='pre'>options</span> : Object<div class='sub-desc'><p>any extra options used to configure the DOM event</p>\n</div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"]\nto click in the center horizontally and 2px from the bottom edge.</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>A function to call after mousedown.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>The scope for the callback</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-mouseUp' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-mouseUp' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-mouseUp' class='name expandable'>mouseUp</a>( <span class='pre'>el, options, [offset]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a mousedown event in the center of the specified DOM element,\nor at current cursor position...</div><div class='long'><p>This method will simulate a mousedown event in the center of the specified DOM element,\nor at current cursor position if no target is provided.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a><div class='sub-desc'>\n</div></li><li><span class='pre'>options</span> : Object<div class='sub-desc'><p>any extra options used to configure the DOM event</p>\n</div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"]\nto click in the center horizontally and 2px from the bottom edge.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-moveCursorAlongPath' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-moveCursorAlongPath' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-moveCursorAlongPath' class='name expandable'>moveCursorAlongPath</a>( <span class='pre'>pathArray, callback</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method sequentially moves a cursor through a series of \"path points\". ...</div><div class='long'><p>This method sequentially moves a cursor through a series of \"path points\".</p>\n\n<p>A path point can be one of the following:</p>\n\n<ul>\n<li>An object <code>{ target : 'query', offset : [ x, y ] }</code>, where 'query' is any valid\n<a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> query. This object will specify an absolute point on the page.</li>\n<li>A more compact notation with single letter properties <code>{ t : 'query', o : [ x, y ] }</code></li>\n<li>An object <code>{ target : [ x, y ] }</code>, where 'x' and 'y' specifies an aboslute point on the page.</li>\n<li>An object <code>{ by : [ dx, dy ] }</code>, where <code>by</code> is an array, with a relative delta from previous point.</li>\n<li>An array with 3 elements: <code>[ 'query', x, y ]</code>, specifying an absolute point on the page, using\n'query' and 'x' 'y' offset.</li>\n<li>An array with 1 element: <code>[ [ x, y ] ]</code>, which is in turn an array, specifying an absolute\npoint on the page, using 'x' and 'y' page coordinates.</li>\n<li>An array with 2 elements: <code>[ dx, dy ]</code>, specifying a relative delta from previous point</li>\n</ul>\n\n\n<p>This method is generally intended to be used by <a href=\"#!/api/Siesta.Recorder.Recorder\" rel=\"Siesta.Recorder.Recorder\" class=\"docClass\">Siesta.Recorder.Recorder</a> with enabled\n<a href=\"#!/api/Siesta.Recorder.Recorder-cfg-recordMouseMovePath\" rel=\"Siesta.Recorder.Recorder-cfg-recordMouseMovePath\" class=\"docClass\">recordMouseMovePath</a> option. That option can generate\na substantial amount of data, thus there is a focus on having a compact notation for it.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>pathArray</span> : Array[path point]<div class='sub-desc'><p>An array of \"path points\"</p>\n</div></li><li><span class='pre'>callback</span> : Function<div class='sub-desc'><p>A function to call after visiting all points</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-moveCursorBy' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-moveCursorBy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-moveCursorBy' class='name expandable'>moveCursorBy</a>( <span class='pre'>delta, [callback], [scope], [options]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a mouse move by an x and y delta amount ...</div><div class='long'><p>This method will simulate a mouse move by an x and y delta amount</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>delta</span> : Array<div class='sub-desc'><p>The delta x and y distance to move, e.g. [20, 20] for 20px down/right, or [0, -10] for 10px up.</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>To run this method async, provide a callback method to be called after the operation is completed.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>the scope for the callback</p>\n</div></li><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Any options to use for the simulated DOM events</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-moveCursorTo' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-moveCursorTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-moveCursorTo' class='name expandable'>moveCursorTo</a>( <span class='pre'>target, [callback], [scope], [offset]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>Alias for moveMouseTo, this method will simulate a mouse move to an xy-coordinate or an element (the center of it) ...</div><div class='long'><p>Alias for moveMouseTo, this method will simulate a mouse move to an xy-coordinate or an element (the center of it)</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>target</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a><div class='sub-desc'><p>Target point to move the mouse to.</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>To run this method async, provide a callback method to be called after the operation is completed.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>the scope for the callback</p>\n</div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"50%\"] to click in the center.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-moveMouseBy' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-moveMouseBy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-moveMouseBy' class='name expandable'>moveMouseBy</a>( <span class='pre'>delta, [callback], [scope], [options]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a mouse move by an x a y delta amount ...</div><div class='long'><p>This method will simulate a mouse move by an x a y delta amount</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>delta</span> : Array<div class='sub-desc'><p>The delta x and y distance to move, e.g. [20, 20] for 20px down/right, or [0, 10] for just 10px down.</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>To run this method async, provide a callback method to be called after the operation is completed.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>the scope for the callback</p>\n</div></li><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Any options to use for the simulated DOM events</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-moveMouseTo' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-moveMouseTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-moveMouseTo' class='name expandable'>moveMouseTo</a>( <span class='pre'>target, [callback], [scope], [offset], [waitForTarget], [options]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a mouse move to an xy-coordinate or an element (the center of it) ...</div><div class='long'><p>This method will simulate a mouse move to an xy-coordinate or an element (the center of it)</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>target</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a><div class='sub-desc'><p>Target point to move the mouse to.</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>To run this method async, provide a callback method to be called after the operation is completed.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>the scope for the callback</p>\n</div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"50%\"] to click in the center.</p>\n</div></li><li><span class='pre'>waitForTarget</span> : Object (optional)<div class='sub-desc'><p><em>private</em> True to wait for the target to exist before moving mouse</p>\n</div></li><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Any options to use for the simulated DOM event</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div><div id='method-rightClick' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-rightClick' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-rightClick' class='name expandable'>rightClick</a>( <span class='pre'>[el], [callback], [scope], [options], [offset]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a mouse right click in the center of the specified DOM/Ext element,\nor at current cursor po...</div><div class='long'><p>This method will simulate a mouse right click in the center of the specified DOM/Ext element,\nor at current cursor position if no target is provided.</p>\n\n<p>Note, that it will first calculate the centeral point of the specified element and then\nwill pick the top-most DOM element from that point. For example, if you will provide a grid row as the <code>el</code>,\nthen click will happen on top of the central cell, and then will bubble to the row itself.\nIn most cases this is the desired behavior.</p>\n\n<p>Example:</p>\n\n<pre><code> t.rightClick(t.getFirstRow(grid), function () { ... })\n</code></pre>\n\n<p>The 1st argument for this method can be omitted. In this case, Siesta will use the current cursor position:</p>\n\n<pre><code> t.rightClick(function () { ... })\n</code></pre>\n\n<p>This method returns a <code>Promise</code> which is resolved once the right click has completed</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> (optional)<div class='sub-desc'><p>One of the <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> values to convert to DOM element</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>A function to call after click.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>The scope for the callback</p>\n</div></li><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Any options to use for the simulated DOM event</p>\n</div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"]\nto click in the center horizontally and 2px from the bottom edge.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the right click has completed</p>\n</div></li></ul></div></div></div><div id='method-wheel' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.UserAgent.Mouse'>Siesta.Test.UserAgent.Mouse</span><br/><a href='source/Mouse.html#Siesta-Test-UserAgent-Mouse-method-wheel' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.UserAgent.Mouse-method-wheel' class='name expandable'>wheel</a>( <span class='pre'>[el], [callback], [scope], [options], options, [offset]</span> ) : Promise<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will simulate a wheel event on the specified DOM element. ...</div><div class='long'><p>This method will simulate a wheel event on the specified DOM element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> (optional)<div class='sub-desc'><p>One of the <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> values to convert to a DOM element</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>A function to call after the action.</p>\n</div></li><li><span class='pre'>scope</span> : Object (optional)<div class='sub-desc'><p>The scope for the callback</p>\n</div></li><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Any options to use for the simulated DOM event</p>\n</div></li><li><span class='pre'>options</span> : Object<div class='sub-desc'><p>any extra options used to configure the DOM event</p>\n<ul><li><span class='pre'>deltaX</span> : Object<div class='sub-desc'><p>a double representing the horizontal scroll amount.</p>\n</div></li><li><span class='pre'>deltaY</span> : Object<div class='sub-desc'><p>a double representing the vertical scroll amount. Not supported in native events simulation.</p>\n</div></li><li><span class='pre'>deltaZ</span> : Object<div class='sub-desc'><p>a double representing scroll amount for the z-axis. Not supported in native events simulation.</p>\n</div></li></ul></div></li><li><span class='pre'>offset</span> : Array (optional)<div class='sub-desc'><p>An X,Y offset relative to the target. Example: [20, 20] for 20px or [\"50%\", \"100%-2\"] to click in the center horizontally and 2px from the bottom edge.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>Promise</span><div class='sub-desc'><p>Returns a promise resolved once the action has completed</p>\n</div></li></ul></div></div></div></div></div></div></div>","meta":{}});