blob: 16c11836f3b9e134d124ed265c5b303781540c8e [file] [log] [blame]
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver.Window</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class webdriver.WebDriver.Window</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1222">code &raquo;</a></header><section><p>An interface for managing the current window.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.WebDriver.Window <span class="args">( driver )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>driver: <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code><dd>The parent driver.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="instance-methods"><h2>Instance Methods</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1236">code &raquo;</a><span class="member"><a name="getPosition">getPosition</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Retrieves the window's current position, relative to the top left corner of
the screen.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that
will be resolved with the window's position in the form of a
{x:number, y:number} object literal.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1269">code &raquo;</a><span class="member"><a name="getSize">getSize</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Retrieves the window's current size.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A
promise that will be resolved with the window's size in the form of a
{width:number, height:number} object literal.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1299">code &raquo;</a><span class="member"><a name="maximize">maximize</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Maximizes the current window.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
when the command has completed.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1253">code &raquo;</a><span class="member"><a name="setPosition">setPosition</a> <span class="args">( x, y )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Repositions the current window.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>x: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The desired horizontal position, relative to the left side
of the screen.<dt>y: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The desired vertical position, relative to the top of the
of the screen.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
when the command has completed.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1284">code &raquo;</a><span class="member"><a name="setSize">setSize</a> <span class="args">( width, height )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Resizes the current window.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>width: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The desired window width.<dt>height: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The desired window height.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
when the command has completed.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1225">code &raquo;</a><span class="member"><a name="driver_">driver_</a> : <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>No data</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>No data</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>No data</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>