FirefoxOptions
in package
implements
JsonSerializable
Class to manage Firefox-specific capabilities
Tags
Table of Contents
Interfaces
- JsonSerializable
Constants
- CAPABILITY = 'moz:firefoxOptions'
- OPTION_ARGS = 'args'
- OPTION_PREFS = 'prefs'
- OPTION_PROFILE = 'profile'
Properties
- $arguments : array<string|int, mixed>
- $options : array<string|int, mixed>
- $preferences : array<string|int, mixed>
- $profile : FirefoxProfile
Methods
- __construct() : mixed
- addArguments() : self
- Command line arguments to pass to the Firefox binary.
- jsonSerialize() : mixed
- setOption() : self
- Directly set firefoxOptions.
- setPreference() : self
- Set Firefox preference (about:config entry).
- setProfile() : self
- toArray() : array<string|int, mixed>
Constants
CAPABILITY
public
string
CAPABILITY
= 'moz:firefoxOptions'
The key of FirefoxOptions in desired capabilities
OPTION_ARGS
public
string
OPTION_ARGS
= 'args'
OPTION_PREFS
public
string
OPTION_PREFS
= 'prefs'
OPTION_PROFILE
public
string
OPTION_PROFILE
= 'profile'
Properties
$arguments
private
array<string|int, mixed>
$arguments
= []
$options
private
array<string|int, mixed>
$options
= []
$preferences
private
array<string|int, mixed>
$preferences
= []
$profile
private
FirefoxProfile
$profile
Methods
__construct()
public
__construct() : mixed
addArguments()
Command line arguments to pass to the Firefox binary.
public
addArguments(array<string|int, string> $arguments) : self
These must include the leading dash (-) where required, e.g. ['-headless'].
Parameters
- $arguments : array<string|int, string>
Tags
Return values
selfjsonSerialize()
public
jsonSerialize() : mixed
Attributes
setOption()
Directly set firefoxOptions.
public
setOption(string $name, mixed $value) : self
Use addArguments
to add command line arguments and setPreference
to set Firefox about:config entry.
Parameters
- $name : string
- $value : mixed
Return values
selfsetPreference()
Set Firefox preference (about:config entry).
public
setPreference(string $name, string|bool|int $value) : self
Parameters
- $name : string
- $value : string|bool|int
Tags
Return values
selfsetProfile()
public
setProfile(FirefoxProfile $profile) : self
Parameters
- $profile : FirefoxProfile
Tags
Return values
selftoArray()
public
toArray() : array<string|int, mixed>