Package org.openqa.selenium.firefox
Class GeckoDriverService.Builder
java.lang.Object
org.openqa.selenium.remote.service.DriverService.Builder<GeckoDriverService,GeckoDriverService.Builder>
org.openqa.selenium.firefox.FirefoxDriverService.Builder<GeckoDriverService,GeckoDriverService.Builder>
org.openqa.selenium.firefox.GeckoDriverService.Builder
- Enclosing class:
GeckoDriverService
@AutoService(org.openqa.selenium.remote.service.DriverService.Builder.class)
public static class GeckoDriverService.Builder
extends FirefoxDriverService.Builder<GeckoDriverService,GeckoDriverService.Builder>
Builder used to configure new
GeckoDriverService instances.-
Field Summary
Fields inherited from class org.openqa.selenium.remote.service.DriverService.Builder
exe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnectToExisting(int marionettePort) Configures geckodriver to connect to an existing Firefox instance via the specified Marionette port.protected GeckoDriverServicecreateDriverService(@Nullable File exe, int port, @Nullable Duration timeout, @Nullable List<String> args, @Nullable Map<String, String> environment) protected voidintscore(org.openqa.selenium.Capabilities capabilities) withAllowHosts(@Nullable String allowHosts) Values of the Host header to allow for incoming requests.withLogLevel(@Nullable FirefoxDriverLogLevel logLevel) withProfileRoot(@Nullable File root) This is necessary when you do not have permissions to write to the default directory.withTruncatedLogs(@Nullable Boolean truncate) withWebSocketPort(@Nullable Integer websocketPort) Configures the WebSocket port for BiDi.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
public int score(org.openqa.selenium.Capabilities capabilities) - Specified by:
scorein classorg.openqa.selenium.remote.service.DriverService.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.
-
connectToExisting
Configures geckodriver to connect to an existing Firefox instance via the specified Marionette port.- Parameters:
marionettePort- The port where Marionette is listening on the existing Firefox instance.- Returns:
- A self reference.
-
withWebSocketPort
Configures the WebSocket port for BiDi. A value of 0 will automatically allocate a free port.- Parameters:
websocketPort- The port to use for WebSocket communication, or 0 for automatic allocation.- Returns:
- A self reference.
-
loadSystemProperties
protected void loadSystemProperties()- Specified by:
loadSystemPropertiesin classorg.openqa.selenium.remote.service.DriverService.Builder<GeckoDriverService,GeckoDriverService.Builder>
-
createArgs
- Specified by:
createArgsin classorg.openqa.selenium.remote.service.DriverService.Builder<GeckoDriverService,GeckoDriverService.Builder>
-
createDriverService
protected GeckoDriverService createDriverService(@Nullable File exe, int port, @Nullable Duration timeout, @Nullable List<String> args, @Nullable Map<String, String> environment) - Specified by:
createDriverServicein classorg.openqa.selenium.remote.service.DriverService.Builder<GeckoDriverService,GeckoDriverService.Builder>
-