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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder used to configure newGeckoDriverServiceinstances. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringSystem property that defines the location of the GeckoDriver executable that will be used by thedefault service.static final StringSystem property that defines theFirefoxDriverLogLevelfor GeckoDriver logs.static final StringBoolean system property to disable truncation of long log lines.static final StringSystem property that defines the location of the file where GeckoDriver should write log messages to.static final Stringstatic final StringSystem 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GeckoDriverServiceConfigures and returns a newGeckoDriverServiceusing the default configuration.org.openqa.selenium.Capabilitiesprotected booleanprotected voidMethods 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_EXE_ENVIRONMENT_VARIABLE
- 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 theFirefoxDriverLogLevelfor 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(@Nullable File executable, int port, @Nullable Duration timeout, @Nullable List<String> args, @Nullable 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:
getDriverNamein classorg.openqa.selenium.remote.service.DriverService
-
getDriverProperty
- Overrides:
getDriverPropertyin classorg.openqa.selenium.remote.service.DriverService
-
getDriverEnvironmentVariable
- Overrides:
getDriverEnvironmentVariablein classorg.openqa.selenium.remote.service.DriverService
-
getDefaultDriverOptions
public org.openqa.selenium.Capabilities getDefaultDriverOptions()- Overrides:
getDefaultDriverOptionsin classorg.openqa.selenium.remote.service.DriverService
-
createDefaultService
Configures and returns a newGeckoDriverServiceusing the default configuration. In this configuration, the service will use the GeckoDriver executable identified by the. Each service created by this method will be configured to use a free port on the current system.invalid reference
org.openqa.selenium.remote.service.DriverFinder#getResult(DriverService, Capabilities)- Returns:
- A new GeckoDriverService using the default configuration.
-
waitUntilAvailable
protected void waitUntilAvailable()- Overrides:
waitUntilAvailablein classorg.openqa.selenium.remote.service.DriverService
-
hasShutdownEndpoint
protected boolean hasShutdownEndpoint()- Overrides:
hasShutdownEndpointin classorg.openqa.selenium.remote.service.DriverService
-