Package org.openqa.selenium.chrome
Class ChromeDriverService.Builder
java.lang.Object
org.openqa.selenium.remote.service.DriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
org.openqa.selenium.chrome.ChromeDriverService.Builder
- Enclosing class:
- ChromeDriverService
@AutoService(Builder.class)
public static class ChromeDriverService.Builder
extends DriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
Builder used to configure new
ChromeDriverService instances.-
Field Summary
Fields inherited from class org.openqa.selenium.remote.service.DriverService.Builder
exe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ChromeDriverServicecreateDriverService(File exe, int port, Duration timeout, List<String> args, Map<String, String> environment) protected voidintscore(Capabilities capabilities) Provides a measure of how strongly thisDriverServicesupports the givencapabilities.withAllowedListIps(String allowedListIps) Configures the comma-separated list of remote IPv4 addresses which are allowed to connect to the driver server.withAppendLog(boolean appendLog) Configures the driver server appending to log file.withBuildCheckDisabled(boolean noBuildCheck) Allows the driver to be used with potentially incompatible versions of the browser.withLogLevel(ChromiumDriverLogLevel logLevel) Configures the driver server log level.withReadableTimestamp(Boolean readableTimestamp) Configures the format of the logging for the driver server.withSilent(boolean silent) Configures the driver server for silent output.withVerbose(boolean verbose) Configures the driver server verbosity.Methods inherited from class org.openqa.selenium.remote.service.DriverService.Builder
build, getDefaultTimeout, getLogFile, getLogOutput, getPort, parseLogOutput, usingAnyFreePort, usingDriverExecutable, usingPort, withEnvironment, withLogFile, withLogOutput, withTimeout
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
score
Description copied from class:DriverService.BuilderProvides a measure of how strongly thisDriverServicesupports the givencapabilities. A score of 0 or less indicates that thisDriverServicedoes not support instances ofWebDriverthat requirecapabilities. Typically, the score is generated by summing the number of capabilities that the driver service directly supports that are unique to the driver service (that is, things like "proxy" don't tend to count to the score).- Specified by:
scorein classDriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-
withAppendLog
Configures the driver server appending to log file.- Parameters:
appendLog- True for appending to log file, false otherwise.- Returns:
- A self reference.
-
withBuildCheckDisabled
Allows the driver to be used with potentially incompatible versions of the browser.- Parameters:
noBuildCheck- True for not enforcing matching versions.- Returns:
- A self reference.
-
withLogLevel
Configures the driver server log level.- Parameters:
logLevel-ChromiumDriverLogLevelfor desired log level output.- Returns:
- A self reference.
-
withSilent
Configures the driver server for silent output.- Parameters:
silent- Log no output for true, no changes made if false.- Returns:
- A self reference.
-
withVerbose
Configures the driver server verbosity.- Parameters:
verbose- Log all output for true, no changes made if false.- Returns:
- A self reference.
-
withAllowedListIps
Configures the comma-separated list of remote IPv4 addresses which are allowed to connect to the driver server.- Parameters:
allowedListIps- Comma-separated list of remote IPv4 addresses.- Returns:
- A self reference.
-
withReadableTimestamp
Configures the format of the logging for the driver server.- Parameters:
readableTimestamp- Whether the timestamp of the log is readable.- Returns:
- A self reference.
-
loadSystemProperties
protected void loadSystemProperties()- Specified by:
loadSystemPropertiesin classDriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-
createArgs
- Specified by:
createArgsin classDriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-
createDriverService
protected ChromeDriverService createDriverService(File exe, int port, Duration timeout, List<String> args, Map<String, String> environment) - Specified by:
createDriverServicein classDriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-