class WebDriverWindow (View source)

An abstraction allowing the driver to manipulate the browser's window

Properties

protected $executor

Methods

__construct($executor)

No description

array
getPosition()

Get the position of the current window, relative to the upper left corner of the screen.

array
getSize()

Get the size of the current window. This will return the outer window dimension, not just the view port.

maximize()

Maximizes the current window if it is not already maximized

setSize(WebDriverDimension $size)

Set the size of the current window. This will change the outer window dimension, not just the view port.

setPosition(WebDriverPoint $position)

Set the position of the current window. This is relative to the upper left corner of the screen.

string
getScreenOrientation()

Get the current browser orientation.

setScreenOrientation(string $orientation)

Set the browser orientation. The orientation should either LANDSCAPE|PORTRAIT

Details

__construct($executor)

No description

Parameters

$executor

array getPosition()

Get the position of the current window, relative to the upper left corner of the screen.

Return Value

array

The current window position.

array getSize()

Get the size of the current window. This will return the outer window dimension, not just the view port.

Return Value

array

The current window size.

WebDriverWindow maximize()

Maximizes the current window if it is not already maximized

Return Value

WebDriverWindow

The instance.

WebDriverWindow setSize(WebDriverDimension $size)

Set the size of the current window. This will change the outer window dimension, not just the view port.

Parameters

WebDriverDimension $size

Return Value

WebDriverWindow

The instance.

WebDriverWindow setPosition(WebDriverPoint $position)

Set the position of the current window. This is relative to the upper left corner of the screen.

Parameters

WebDriverPoint $position

Return Value

WebDriverWindow

The instance.

string getScreenOrientation()

Get the current browser orientation.

Return Value

string

Either LANDSCAPE|PORTRAIT

WebDriverWindow setScreenOrientation(string $orientation)

Set the browser orientation. The orientation should either LANDSCAPE|PORTRAIT

Parameters

string $orientation

Return Value

WebDriverWindow

The instance.

Exceptions

IndexOutOfBoundsException