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 newChromeDriverServiceinstances.
-
-
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 ChromeDriverServicecreateDriverService(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)protected java.io.FilefindDefaultExecutable()intscore(org.openqa.selenium.Capabilities capabilities)ChromeDriverService.BuilderwithAllowedListIps(java.lang.String allowedListIps)Configures the comma-separated list of remote IPv4 addresses which are allowed to connect to the driver server.ChromeDriverService.BuilderwithAppendLog(boolean appendLog)Configures the driver server appending to log file.ChromeDriverService.BuilderwithBuildCheckDisabled(boolean noBuildCheck)Allows the driver to be used with potentially incompatible versions of the browser.ChromeDriverService.BuilderwithLogLevel(ChromeDriverLogLevel logLevel)Deprecated.usewithLogLevel(ChromiumDriverLogLevel)instead.ChromeDriverService.BuilderwithLogLevel(org.openqa.selenium.chromium.ChromiumDriverLogLevel logLevel)Configures the driver server verbosity.ChromeDriverService.BuilderwithReadableTimestamp(java.lang.Boolean readableTimestamp)Configures the format of the logging for the driver server.ChromeDriverService.BuilderwithSilent(boolean silent)Configures the driver server for silent output.ChromeDriverService.BuilderwithVerbose(boolean verbose)Configures the driver server verbosity.ChromeDriverService.BuilderwithWhitelistedIps(java.lang.String allowedListIps)Deprecated.
-
-
-
Method Detail
-
score
public int score(org.openqa.selenium.Capabilities capabilities)
- Specified by:
scorein 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-ChromeDriverLogLevelfor 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-ChromiumDriverLogLevelfor 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.
-
findDefaultExecutable
protected java.io.File findDefaultExecutable()
- Specified by:
findDefaultExecutablein classorg.openqa.selenium.remote.service.DriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-
createArgs
protected java.util.List<java.lang.String> createArgs()
- Specified by:
createArgsin 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:
createDriverServicein classorg.openqa.selenium.remote.service.DriverService.Builder<ChromeDriverService,ChromeDriverService.Builder>
-
-