Package org.openqa.selenium.firefox
Class GeckoDriverService
java.lang.Object
org.openqa.selenium.remote.service.DriverService
org.openqa.selenium.firefox.FirefoxDriverService
org.openqa.selenium.firefox.GeckoDriverService
- All Implemented Interfaces:
Closeable
,AutoCloseable
Manages the life and death of an GeckoDriver
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder used to configure newGeckoDriverService
instances. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
System property that defines the location of the GeckoDriver executable that will be used by thedefault service
.static final String
System property that defines theFirefoxDriverLogLevel
for GeckoDriver logs.static final String
Boolean system property to disable truncation of long log lines.static final String
System property that defines the location of the file where GeckoDriver should write log messages to.static final String
static final String
System property that defines the location of the directory in which to create profiles SeeGeckoDriverService.Builder.withProfileRoot(File)
Fields inherited from class org.openqa.selenium.remote.service.DriverService
DEFAULT_TIMEOUT, LOG_NULL, LOG_STDERR, LOG_STDOUT, process
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeckoDriverService
Configures and returns a newGeckoDriverService
using the default configuration.protected boolean
protected void
Methods inherited from class org.openqa.selenium.remote.service.DriverService
close, getArgs, getDriverExecutable, getEnvironment, getExecutable, getOutputStream, getTimeout, getUrl, getUrl, isRunning, sendOutputTo, setExecutable, start, stop
-
Field Details
-
GECKO_DRIVER_NAME
- See Also:
-
GECKO_DRIVER_EXE_PROPERTY
System property that defines the location of the GeckoDriver executable that will be used by thedefault service
.- See Also:
-
GECKO_DRIVER_LOG_PROPERTY
System property that defines the location of the file where GeckoDriver should write log messages to.- See Also:
-
GECKO_DRIVER_LOG_LEVEL_PROPERTY
System property that defines theFirefoxDriverLogLevel
for GeckoDriver logs. SeeGeckoDriverService.Builder.withLogLevel(FirefoxDriverLogLevel)
- See Also:
-
GECKO_DRIVER_LOG_NO_TRUNCATE
Boolean system property to disable truncation of long log lines. SeeGeckoDriverService.Builder.withTruncatedLogs(Boolean)
- See Also:
-
GECKO_DRIVER_PROFILE_ROOT
System property that defines the location of the directory in which to create profiles SeeGeckoDriverService.Builder.withProfileRoot(File)
- See Also:
-
-
Constructor Details
-
GeckoDriverService
public GeckoDriverService(File executable, int port, Duration timeout, List<String> args, Map<String, String> environment) throws IOException- Parameters:
executable
- The GeckoDriver executable.port
- Which port to start the GeckoDriver on.timeout
- Timeout waiting for driver server to start.args
- The arguments to the launched server.environment
- The environment for the launched server.- Throws:
IOException
- If an I/O error occurs.
-
-
Method Details
-
getDriverName
- Overrides:
getDriverName
in classDriverService
-
getDriverProperty
- Overrides:
getDriverProperty
in classDriverService
-
getDefaultDriverOptions
- Overrides:
getDefaultDriverOptions
in classDriverService
-
createDefaultService
Configures and returns a newGeckoDriverService
using the default configuration. In this configuration, the service will use the GeckoDriver executable identified by theorg.openqa.selenium.remote.service.DriverFinder#getResult(DriverService, Capabilities)
. Each service created by this method will be configured to use a free port on the current system.- Returns:
- A new GeckoDriverService using the default configuration.
-
waitUntilAvailable
protected void waitUntilAvailable()- Overrides:
waitUntilAvailable
in classDriverService
-
hasShutdownEndpoint
protected boolean hasShutdownEndpoint()- Overrides:
hasShutdownEndpoint
in classDriverService
-