class ChromeOptions (View source)

The class manages the capabilities in ChromeDriver.

Constants

deprecated CAPABILITY

The key of chrome options desired capabilities (in legacy OSS JsonWire protocol)

CAPABILITY_W3C

The key of chrome options desired capabilities (in W3C compatible protocol)

Methods

setBinary(string $path)

Sets the path of the Chrome executable. The path should be either absolute or relative to the location running ChromeDriver server.

addArguments(array $arguments)

No description

addExtensions(array $paths)

Add a Chrome extension to install on browser startup. Each path should be a packed Chrome extension.

addEncodedExtensions(array $encoded_extensions)

No description

setExperimentalOption(string $name, mixed $value)

Sets an experimental option which has not exposed officially.

array
toArray()

No description

Details

ChromeOptions setBinary(string $path)

Sets the path of the Chrome executable. The path should be either absolute or relative to the location running ChromeDriver server.

Parameters

string $path

Return Value

ChromeOptions

ChromeOptions addArguments(array $arguments)

No description

Parameters

array $arguments

Return Value

ChromeOptions

ChromeOptions addExtensions(array $paths)

Add a Chrome extension to install on browser startup. Each path should be a packed Chrome extension.

Parameters

array $paths

Return Value

ChromeOptions

ChromeOptions addEncodedExtensions(array $encoded_extensions)

No description

Parameters

array $encoded_extensions

An array of base64 encoded of the extensions.

Return Value

ChromeOptions

ChromeOptions setExperimentalOption(string $name, mixed $value)

Sets an experimental option which has not exposed officially.

Parameters

string $name
mixed $value

Return Value

ChromeOptions

DesiredCapabilities toCapabilities()

No description

Return Value

DesiredCapabilities

The DesiredCapabilities for Chrome with this options.

array toArray()

No description

Return Value

array