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(org.openqa.selenium.remote.service.DriverService.Builder.class) public static class ChromeDriverService.Builder extends org.openqa.selenium.remote.service.DriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
Builder used to configure newChromeDriverService
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.util.List<java.lang.String>
createArgs()
protected ChromeDriverService
createDriverService(java.io.File exe, int port, java.time.Duration timeout, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> environment)
int
score(org.openqa.selenium.Capabilities capabilities)
ChromeDriverService.Builder
withAllowedListIps(java.lang.String allowedListIps)
Configures the comma-separated list of remote IPv4 addresses which are allowed to connect to the driver server.ChromeDriverService.Builder
withAppendLog(boolean appendLog)
Configures the driver server appending to log file.ChromeDriverService.Builder
withBuildCheckDisabled(boolean noBuildCheck)
Allows the driver to be used with potentially incompatible versions of the browser.ChromeDriverService.Builder
withLogLevel(ChromeDriverLogLevel logLevel)
Deprecated.usewithLogLevel(ChromiumDriverLogLevel)
instead.ChromeDriverService.Builder
withLogLevel(org.openqa.selenium.chromium.ChromiumDriverLogLevel logLevel)
Configures the driver server verbosity.ChromeDriverService.Builder
withReadableTimestamp(java.lang.Boolean readableTimestamp)
Configures the format of the logging for the driver server.ChromeDriverService.Builder
withSilent(boolean silent)
Configures the driver server for silent output.ChromeDriverService.Builder
withVerbose(boolean verbose)
Configures the driver server verbosity.ChromeDriverService.Builder
withWhitelistedIps(java.lang.String allowedListIps)
Deprecated.
-
-
-
Method Detail
-
score
public int score(org.openqa.selenium.Capabilities capabilities)
- Specified by:
score
in classorg.openqa.selenium.remote.service.DriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-
withAppendLog
public ChromeDriverService.Builder withAppendLog(boolean appendLog)
Configures the driver server appending to log file.- Parameters:
appendLog
- True for appending to log file, false otherwise.- Returns:
- A self reference.
-
withBuildCheckDisabled
public ChromeDriverService.Builder withBuildCheckDisabled(boolean noBuildCheck)
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.
-
withVerbose
public ChromeDriverService.Builder withVerbose(boolean verbose)
Configures the driver server verbosity.- Parameters:
verbose
- Log all output for true, no changes made if false.- Returns:
- A self reference.
-
withLogLevel
@Deprecated public ChromeDriverService.Builder withLogLevel(ChromeDriverLogLevel logLevel)
Deprecated.usewithLogLevel(ChromiumDriverLogLevel)
instead.Configures the driver server verbosity.- Parameters:
logLevel
-ChromeDriverLogLevel
for desired log level output.- Returns:
- A self reference.
-
withLogLevel
public ChromeDriverService.Builder withLogLevel(org.openqa.selenium.chromium.ChromiumDriverLogLevel logLevel)
Configures the driver server verbosity.- Parameters:
logLevel
-ChromiumDriverLogLevel
for desired log level output.- Returns:
- A self reference.
-
withSilent
public ChromeDriverService.Builder withSilent(boolean silent)
Configures the driver server for silent output.- Parameters:
silent
- Log no output for true, no changes made if false.- Returns:
- A self reference.
-
withWhitelistedIps
@Deprecated public ChromeDriverService.Builder withWhitelistedIps(java.lang.String allowedListIps)
Deprecated.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.
-
withAllowedListIps
public ChromeDriverService.Builder withAllowedListIps(java.lang.String allowedListIps)
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
public ChromeDriverService.Builder withReadableTimestamp(java.lang.Boolean readableTimestamp)
Configures the format of the logging for the driver server.- Parameters:
readableTimestamp
- Whether the timestamp of the log is readable.- Returns:
- A self reference.
-
createArgs
protected java.util.List<java.lang.String> createArgs()
- Specified by:
createArgs
in classorg.openqa.selenium.remote.service.DriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-
createDriverService
protected ChromeDriverService createDriverService(java.io.File exe, int port, java.time.Duration timeout, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> environment)
- Specified by:
createDriverService
in classorg.openqa.selenium.remote.service.DriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-
-