ChromeDriverService
extends DriverService
in package
Start local WebDriver service (when remote WebDriver server is not used).
This will start new process of respective browser driver and take care of its lifecycle.
Table of Contents
Constants
- CHROME_DRIVER_EXE_PROPERTY = 'webdriver.chrome.driver'
- The environment variable storing the path to the chrome driver executable.
- CHROME_DRIVER_EXECUTABLE = 'WEBDRIVER_CHROME_DRIVER'
Properties
- $args : array<string|int, mixed>
- $environment : array<string|int, mixed>
- $executable : string
- $process : Process|null
- $url : string
Methods
- __construct() : mixed
- createDefaultService() : static
- getURL() : string
- isRunning() : bool
- start() : DriverService
- stop() : DriverService
- checkExecutable() : string
- checkWasStarted() : mixed
- setExecutable() : mixed
- createProcess() : Process
- isExecutable() : bool
- Check whether given file is executable directly or using system PATH
Constants
CHROME_DRIVER_EXE_PROPERTY
The environment variable storing the path to the chrome driver executable.
public
mixed
CHROME_DRIVER_EXE_PROPERTY
= 'webdriver.chrome.driver'
Tags
CHROME_DRIVER_EXECUTABLE
public
string
CHROME_DRIVER_EXECUTABLE
= 'WEBDRIVER_CHROME_DRIVER'
The environment variable storing the path to the chrome driver executable
Properties
$args
private
array<string|int, mixed>
$args
$environment
private
array<string|int, mixed>
$environment
$executable
private
string
$executable
$process
private
Process|null
$process
$url
private
string
$url
Methods
__construct()
public
__construct(string $executable, int $port[, array<string|int, mixed> $args = [] ][, array<string|int, mixed>|null $environment = null ]) : mixed
Parameters
- $executable : string
- $port : int
-
The given port the service should use.
- $args : array<string|int, mixed> = []
- $environment : array<string|int, mixed>|null = null
-
Use the system environment if it is null
createDefaultService()
public
static createDefaultService() : static
Return values
staticgetURL()
public
getURL() : string
Return values
stringisRunning()
public
isRunning() : bool
Return values
boolstart()
public
start() : DriverService
Return values
DriverServicestop()
public
stop() : DriverService
Return values
DriverServicecheckExecutable()
protected
static checkExecutable(string $executable) : string
Parameters
- $executable : string
Tags
Return values
stringcheckWasStarted()
protected
checkWasStarted(Process $process) : mixed
Parameters
- $process : Process
setExecutable()
protected
setExecutable(string $executable) : mixed
Parameters
- $executable : string
Tags
createProcess()
private
createProcess() : Process
Return values
ProcessisExecutable()
Check whether given file is executable directly or using system PATH
private
isExecutable(string $filename) : bool
Parameters
- $filename : string