class WebDriverOptions (View source)

Managing stuff you would do in a browser.

Properties

protected ExecuteMethod $executor

Methods

__construct(ExecuteMethod $executor)

No description

addCookie(array $cookie)

Add a specific cookie.

deleteAllCookies()

Delete all the cookies that are currently visible.

deleteCookieNamed(string $name)

Delete the cookie with the give name.

array
getCookieNamed(string $name)

Get the cookie with a given name.

array
getCookies()

Get all the cookies for the current domain.

timeouts()

Return the interface for managing driver timeouts.

window()

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

array
getLog(string $log_type)

Get the log for a given log type. Log buffer is reset after each request.

array
getAvailableLogTypes()

Get available log types.

Details

__construct(ExecuteMethod $executor)

No description

Parameters

ExecuteMethod $executor

WebDriverOptions addCookie(array $cookie)

Add a specific cookie.

Here are the valid attributes of a cookie array. 'name' : string The name of the cookie; may not be null or an empty string. 'value' : string The cookie value; may not be null. 'path' : string OPTIONAL The path the cookie is visible to. Defaults to "/" if omitted. 'domain' : string OPTIONAL The domain the cookie is visible to. Defaults to the current browsing context's document's URL domain if omitted. 'secure' : bool OPTIONAL Whether this cookie requires a secure connection (https). Defaults to false if omitted. 'httpOnly': bool OPTIONAL Whether the cookie is an HTTP only cookie. Defaults to false if omitted. 'expiry' : int OPTIONAL The cookie's expiration date, specified in seconds since Unix Epoch.

Parameters

array $cookie

An array with key as the attributes mentioned above.

Return Value

WebDriverOptions

The current instance.

See also

https://w3c.github.io/webdriver/webdriver-spec.html#cookies

WebDriverOptions deleteAllCookies()

Delete all the cookies that are currently visible.

Return Value

WebDriverOptions

The current instance.

WebDriverOptions deleteCookieNamed(string $name)

Delete the cookie with the give name.

Parameters

string $name

Return Value

WebDriverOptions

The current instance.

array getCookieNamed(string $name)

Get the cookie with a given name.

Parameters

string $name

Return Value

array

The cookie, or null if no cookie with the given name is presented.

array getCookies()

Get all the cookies for the current domain.

Return Value

array

The array of cookies presented.

WebDriverTimeouts timeouts()

Return the interface for managing driver timeouts.

Return Value

WebDriverTimeouts

WebDriverWindow window()

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

Return Value

WebDriverWindow

See also

WebDriverWindow

array getLog(string $log_type)

Get the log for a given log type. Log buffer is reset after each request.

Parameters

string $log_type

The log type.

Return Value

array

The list of log entries.

See also

https://code.google.com/p/selenium/wiki/JsonWireProtocol#Log_Type

array getAvailableLogTypes()

Get available log types.

Return Value

array

The list of available log types.

See also

https://code.google.com/p/selenium/wiki/JsonWireProtocol#Log_Type