Package org.openqa.selenium.firefox
Class GeckoDriverService.Builder
java.lang.Object
org.openqa.selenium.remote.service.DriverService.Builder<DS,B>
org.openqa.selenium.firefox.FirefoxDriverService.Builder<GeckoDriverService,GeckoDriverService.Builder>
org.openqa.selenium.firefox.GeckoDriverService.Builder
- Enclosing class:
- GeckoDriverService
@AutoService(Builder.class)
public static class GeckoDriverService.Builder
extends FirefoxDriverService.Builder<GeckoDriverService,GeckoDriverService.Builder>
Builder used to configure new
GeckoDriverService
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected GeckoDriverService
createDriverService
(File exe, int port, Duration timeout, List<String> args, Map<String, String> environment) protected void
int
score
(Capabilities capabilities) Provides a measure of how strongly thisDriverService
supports the givencapabilities
.withAllowHosts
(String allowHosts) Values of the Host header to allow for incoming requests.withLogLevel
(FirefoxDriverLogLevel logLevel) withProfileRoot
(File root) This is necessary when you do not have permissions to write to the default directory.withTruncatedLogs
(Boolean truncate) 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.Builder
Provides a measure of how strongly thisDriverService
supports the givencapabilities
. A score of 0 or less indicates that thisDriverService
does not support instances ofWebDriver
that 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:
score
in classDriverService.Builder<GeckoDriverService,
GeckoDriverService.Builder>
-
withAllowHosts
Values of the Host header to allow for incoming requests.- Parameters:
allowHosts
- Space-separated list of host names.- Returns:
- A self reference.
-
withLogLevel
- Parameters:
logLevel
- which log events to record.- Returns:
- A self reference.
-
withTruncatedLogs
- Parameters:
truncate
- whether to truncate long lines in the log. Log lines are truncated by default; setting "false" removes truncation- Returns:
- A self reference.
-
withProfileRoot
This is necessary when you do not have permissions to write to the default directory.- Parameters:
root
- location to store temporary profiles Defaults to the system temporary directory.- Returns:
- A self reference.
-
loadSystemProperties
protected void loadSystemProperties()- Specified by:
loadSystemProperties
in classDriverService.Builder<GeckoDriverService,
GeckoDriverService.Builder>
-
createArgs
- Specified by:
createArgs
in classDriverService.Builder<GeckoDriverService,
GeckoDriverService.Builder>
-
createDriverService
protected GeckoDriverService createDriverService(File exe, int port, Duration timeout, List<String> args, Map<String, String> environment) - Specified by:
createDriverService
in classDriverService.Builder<GeckoDriverService,
GeckoDriverService.Builder>
-