class WebDriverWindow (View source)

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

Properties

protected ExecuteMethod $executor
protected bool $isW3cCompliant

Methods

__construct(ExecuteMethod $executor, $isW3cCompliant = false)

No description

getPosition()

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

getSize()

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

minimize()

Minimizes the current window if it is not already minimized.

maximize()

Maximizes the current window if it is not already maximized

fullscreen()

Makes the current window full screen.

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(ExecuteMethod $executor, $isW3cCompliant = false)

No description

Parameters

ExecuteMethod $executor
$isW3cCompliant

WebDriverPoint getPosition()

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

Return Value

WebDriverPoint

The current window position.

WebDriverDimension getSize()

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

Return Value

WebDriverDimension

The current window size.

WebDriverWindow minimize()

Minimizes the current window if it is not already minimized.

Return Value

WebDriverWindow

The instance.

WebDriverWindow maximize()

Maximizes the current window if it is not already maximized

Return Value

WebDriverWindow

The instance.

WebDriverWindow fullscreen()

Makes the current window full screen.

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