Class webdriver.WebDriver.Window

code »

An interface for managing the current window.

Constructor

webdriver.WebDriver.Window ( driver )
Parameters
driver: !webdriver.WebDriver
The parent driver.
Show:

Instance Methods

Retrieves the window's current position, relative to the top left corner of the screen.

Returns
A promise that will be resolved with the window's position in the form of a {x:number, y:number} object literal.

Retrieves the window's current size.

Returns
A promise that will be resolved with the window's size in the form of a {width:number, height:number} object literal.

Maximizes the current window.

Returns
A promise that will be resolved when the command has completed.

Repositions the current window.

Parameters
x: number
The desired horizontal position, relative to the left side of the screen.
y: number
The desired vertical position, relative to the top of the of the screen.
Returns
A promise that will be resolved when the command has completed.
code »setSize ( width, height )!webdriver.promise.Promise.<void>

Resizes the current window.

Parameters
width: number
The desired window width.
height: number
The desired window height.
Returns
A promise that will be resolved when the command has completed.

Instance Properties