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:
java.io.Closeable
,java.lang.AutoCloseable
public class GeckoDriverService extends FirefoxDriverService
Manages the life and death of an GeckoDriver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeckoDriverService.Builder
Builder used to configure newGeckoDriverService
instances.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
GECKO_DRIVER_EXE_PROPERTY
System property that defines the location of the GeckoDriver executable that will be used by thedefault service
.static java.lang.String
GECKO_DRIVER_LOG_LEVEL_PROPERTY
System property that defines theFirefoxDriverLogLevel
for GeckoDriver logs.static java.lang.String
GECKO_DRIVER_LOG_NO_TRUNCATE
Boolean system property to disable truncation of long log lines.static java.lang.String
GECKO_DRIVER_LOG_PROPERTY
System property that defines the location of the file where GeckoDriver should write log messages to.static java.lang.String
GECKO_DRIVER_NAME
static java.lang.String
GECKO_DRIVER_PROFILE_ROOT
System property that defines the location of the directory in which to create profiles SeeGeckoDriverService.Builder.withProfileRoot(File)
-
Constructor Summary
Constructors Constructor Description GeckoDriverService(java.io.File executable, int port, java.time.Duration timeout, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> environment)
GeckoDriverService(java.io.File executable, int port, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> environment)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeckoDriverService
createDefaultService()
Configures and returns a newGeckoDriverService
using the default configuration.org.openqa.selenium.Capabilities
getDefaultDriverOptions()
java.lang.String
getDriverName()
java.lang.String
getDriverProperty()
protected boolean
hasShutdownEndpoint()
protected void
waitUntilAvailable()
-
-
-
Field Detail
-
GECKO_DRIVER_NAME
public static final java.lang.String GECKO_DRIVER_NAME
- See Also:
- Constant Field Values
-
GECKO_DRIVER_EXE_PROPERTY
public static final java.lang.String GECKO_DRIVER_EXE_PROPERTY
System property that defines the location of the GeckoDriver executable that will be used by thedefault service
.- See Also:
- Constant Field Values
-
GECKO_DRIVER_LOG_PROPERTY
public static final java.lang.String GECKO_DRIVER_LOG_PROPERTY
System property that defines the location of the file where GeckoDriver should write log messages to.- See Also:
- Constant Field Values
-
GECKO_DRIVER_LOG_LEVEL_PROPERTY
public static final java.lang.String GECKO_DRIVER_LOG_LEVEL_PROPERTY
System property that defines theFirefoxDriverLogLevel
for GeckoDriver logs. SeeGeckoDriverService.Builder.withLogLevel(FirefoxDriverLogLevel)
- See Also:
- Constant Field Values
-
GECKO_DRIVER_LOG_NO_TRUNCATE
public static final java.lang.String GECKO_DRIVER_LOG_NO_TRUNCATE
Boolean system property to disable truncation of long log lines. SeeGeckoDriverService.Builder.withTruncatedLogs(Boolean)
- See Also:
- Constant Field Values
-
GECKO_DRIVER_PROFILE_ROOT
public static final java.lang.String GECKO_DRIVER_PROFILE_ROOT
System property that defines the location of the directory in which to create profiles SeeGeckoDriverService.Builder.withProfileRoot(File)
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GeckoDriverService
@Deprecated public GeckoDriverService(java.io.File executable, int port, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> environment) throws java.io.IOException
Deprecated.- Parameters:
executable
- The GeckoDriver executable.port
- Which port to start the GeckoDriver on.args
- The arguments to the launched server.environment
- The environment for the launched server.- Throws:
java.io.IOException
- If an I/O error occurs.
-
GeckoDriverService
public GeckoDriverService(java.io.File executable, int port, java.time.Duration timeout, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> environment) throws java.io.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:
java.io.IOException
- If an I/O error occurs.
-
-
Method Detail
-
getDriverName
public java.lang.String getDriverName()
- Overrides:
getDriverName
in classorg.openqa.selenium.remote.service.DriverService
-
getDriverProperty
public java.lang.String getDriverProperty()
- Overrides:
getDriverProperty
in classorg.openqa.selenium.remote.service.DriverService
-
getDefaultDriverOptions
public org.openqa.selenium.Capabilities getDefaultDriverOptions()
- Overrides:
getDefaultDriverOptions
in classorg.openqa.selenium.remote.service.DriverService
-
createDefaultService
public static GeckoDriverService createDefaultService()
Configures and returns a newGeckoDriverService
using the default configuration. In this configuration, the service will use the GeckoDriver executable identified by theDriverFinder.getPath(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 classorg.openqa.selenium.remote.service.DriverService
-
hasShutdownEndpoint
protected boolean hasShutdownEndpoint()
- Overrides:
hasShutdownEndpoint
in classorg.openqa.selenium.remote.service.DriverService
-
-