class WebDriverOptions (View source)

Managing stuff you would do in a browser.

Properties

protected $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 The path the cookie is visible to. If left blank or set to null, will be set to "/". 'domain': string The domain the cookie is visible to. It should be null or the same as the domain of the current URL. 'secure': bool Whether this cookie requires a secure connection(https?). It should be null or equal to the security of the current URL. 'expiry': int The cookie's expiration date; may be null.

Parameters

array $cookie

An array with key as the attributes mentioned above.

Return Value

WebDriverOptions

The current instance.

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