Class Index | File Index

Classes


Class webdriver.WebDriver.Window


Defined in: webdriver.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
An interface for managing the current window.
Method Summary
Method Attributes Method Name and Description
 
Retrieves the window's current position, relative to the top left corner of the screen.
 
Retrieves the window's current size.
 
Maximizes the current window.
 
Repositions the current window.
 
setSize(width, height)
Resizes the current window.
Class Detail
webdriver.WebDriver.Window(driver)
An interface for managing the current window.
Parameters:
{!webdriver.WebDriver} driver
The parent driver.
Method Detail
{!webdriver.promise.Promise} getPosition()
Retrieves the window's current position, relative to the top left corner of the screen.
Returns:
{!webdriver.promise.Promise} A promise that will be resolved with the window's position in the form of a {x:number, y:number} object literal.

{!webdriver.promise.Promise} getSize()
Retrieves the window's current size.
Returns:
{!webdriver.promise.Promise} A promise that will be resolved with the window's size in the form of a {width:number, height:number} object literal.

{!webdriver.promise.Promise} maximize()
Maximizes the current window.
Returns:
{!webdriver.promise.Promise} A promise that will be resolved when the command has completed.

{!webdriver.promise.Promise} setPosition(x, y)
Repositions the current window.
Parameters:
{number} x
The desired horizontal position, relative to the left side of the screen.
{number} y
The desired vertical position, relative to the top of the of the screen.
Returns:
{!webdriver.promise.Promise} A promise that will be resolved when the command has completed.

{!webdriver.promise.Promise} setSize(width, height)
Resizes the current window.
Parameters:
{number} width
The desired window width.
{number} height
The desired window height.
Returns:
{!webdriver.promise.Promise} A promise that will be resolved when the command has completed.

Documentation generated by JsDoc Toolkit 2.4.0 on Sat Jan 25 2014 14:42:04 GMT-0500 (EST)