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 aka 'wires'.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeckoDriverService.BuilderBuilder used to configure newGeckoDriverServiceinstances.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGECKO_DRIVER_EXE_PROPERTYSystem property that defines the location of the GeckoDriver executable that will be used by thedefault service.
-
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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeckoDriverServicecreateDefaultService()Configures and returns a newGeckoDriverServiceusing the default configuration.protected booleanhasShutdownEndpoint()protected voidwaitUntilAvailable()
-
-
-
Field Detail
-
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
-
-
Constructor Detail
-
GeckoDriverService
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- 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
-
createDefaultService
public static GeckoDriverService createDefaultService()
Configures and returns a newGeckoDriverServiceusing the default configuration. In this configuration, the service will use the GeckoDriver executable identified by theGECKO_DRIVER_EXE_PROPERTYsystem property. 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:
waitUntilAvailablein classorg.openqa.selenium.remote.service.DriverService
-
hasShutdownEndpoint
protected boolean hasShutdownEndpoint()
- Overrides:
hasShutdownEndpointin classorg.openqa.selenium.remote.service.DriverService
-
-