\WebDriverWindow

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

Summary

Methods
Properties
Constants
__construct()
getPosition()
getSize()
maximize()
setSize()
setPosition()
getScreenOrientation()
setScreenOrientation()
No public properties found
No constants found
No protected methods found
$executor
N/A
No private methods found
No private properties found
N/A

Properties

$executor

$executor : 

Type

Methods

__construct()

__construct(  $executor) 

Parameters

$executor

getPosition()

getPosition() : array

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

Returns

array —

The current window position.

getSize()

getSize() : array

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

Returns

array —

The current window size.

maximize()

maximize() : \WebDriverWindow

Maximizes the current window if it is not already maximized

Returns

\WebDriverWindow —

The instance.

setSize()

setSize(\WebDriverDimension  $size) : \WebDriverWindow

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

Parameters

\WebDriverDimension $size

Returns

\WebDriverWindow —

The instance.

setPosition()

setPosition(\WebDriverPoint  $position) : \WebDriverWindow

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

Parameters

\WebDriverPoint $position

Returns

\WebDriverWindow —

The instance.

getScreenOrientation()

getScreenOrientation() : string

Get the current browser orientation.

Returns

string —

Either LANDSCAPE|PORTRAIT

setScreenOrientation()

setScreenOrientation(string  $orientation) : \WebDriverWindow

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

Parameters

string $orientation

Throws

\IndexOutOfBoundsException

Returns

\WebDriverWindow —

The instance.