Package org.openqa.selenium.chrome
Class ChromeDriverService
java.lang.Object
org.openqa.selenium.remote.service.DriverService
org.openqa.selenium.chrome.ChromeDriverService
- All Implemented Interfaces:
Closeable,AutoCloseable
Manages the life and death of a ChromeDriver server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder used to configure newChromeDriverServiceinstances. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property that defines comma-separated list of remote IPv4 addresses which are allowed to connect to ChromeDriver.static final StringBoolean system property that defines whether ChromeDriver should append to existing log file.static final StringSystem property that defines whether the ChromeDriver executable should check for build version compatibility between ChromeDriver and the browser.static final StringSystem property that defines the location of the ChromeDriver executable that will be used by thedefault service.static final StringSystem property that defines theChromiumDriverLogLevelfor ChromeDriver logs.static final StringSystem property that defines the location of the file where ChromeDriver should write log messages to.static final Stringstatic final StringSystem property that toggles the formatting of the timestamps of the logsstatic final StringBoolean system property that defines whether the ChromeDriver executable should be started in silent mode.static final StringBoolean system property that defines whether the ChromeDriver executable should be started with verbose logging.Fields inherited from class org.openqa.selenium.remote.service.DriverService
DEFAULT_TIMEOUT, LOG_NULL, LOG_STDERR, LOG_STDOUT, process -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChromeDriverServiceConfigures and returns a newChromeDriverServiceusing the default configuration.Methods inherited from class org.openqa.selenium.remote.service.DriverService
close, getArgs, getDriverExecutable, getEnvironment, getExecutable, getOutputStream, getTimeout, getUrl, getUrl, hasShutdownEndpoint, isRunning, sendOutputTo, setExecutable, start, stop, waitUntilAvailable
-
Field Details
-
CHROME_DRIVER_NAME
- See Also:
-
CHROME_DRIVER_EXE_PROPERTY
System property that defines the location of the ChromeDriver executable that will be used by thedefault service.- See Also:
-
CHROME_DRIVER_READABLE_TIMESTAMP
System property that toggles the formatting of the timestamps of the logs- See Also:
-
CHROME_DRIVER_LOG_PROPERTY
System property that defines the location of the file where ChromeDriver should write log messages to.- See Also:
-
CHROME_DRIVER_LOG_LEVEL_PROPERTY
System property that defines theChromiumDriverLogLevelfor ChromeDriver logs.- See Also:
-
CHROME_DRIVER_APPEND_LOG_PROPERTY
Boolean system property that defines whether ChromeDriver should append to existing log file.- See Also:
-
CHROME_DRIVER_VERBOSE_LOG_PROPERTY
Boolean system property that defines whether the ChromeDriver executable should be started with verbose logging.- See Also:
-
CHROME_DRIVER_SILENT_OUTPUT_PROPERTY
Boolean system property that defines whether the ChromeDriver executable should be started in silent mode.- See Also:
-
CHROME_DRIVER_ALLOWED_IPS_PROPERTY
System property that defines comma-separated list of remote IPv4 addresses which are allowed to connect to ChromeDriver.- See Also:
-
CHROME_DRIVER_DISABLE_BUILD_CHECK
System property that defines whether the ChromeDriver executable should check for build version compatibility between ChromeDriver and the browser.- See Also:
-
-
Constructor Details
-
ChromeDriverService
public ChromeDriverService(File executable, int port, Duration timeout, List<String> args, Map<String, String> environment) throws IOException- Parameters:
executable- The ChromeDriver executable.port- Which port to start the ChromeDriver on.timeout- Timeout waiting for driver server to start.args- The arguments to the launched server.environment- The environment for the launched server.- Throws:
IOException- If an I/O error occurs.
-
-
Method Details
-
getDriverName
- Overrides:
getDriverNamein classDriverService
-
getDriverProperty
- Overrides:
getDriverPropertyin classDriverService
-
getDefaultDriverOptions
- Overrides:
getDefaultDriverOptionsin classDriverService
-
createDefaultService
Configures and returns a newChromeDriverServiceusing the default configuration. In this configuration, the service will use the ChromeDriver executable identified byDriverFinder.getDriverPath()(DriverService, Capabilities)}. Each service created by this method will be configured to use a free port on the current system.- Returns:
- A new ChromeDriverService using the default configuration.
-