Class GeckoDriverService

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class GeckoDriverService
    extends FirefoxDriverService
    Manages the life and death of an GeckoDriver
    • 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
        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 class org.openqa.selenium.remote.service.DriverService
      • getDriverProperty

        public java.lang.String getDriverProperty()
        Overrides:
        getDriverProperty in class org.openqa.selenium.remote.service.DriverService
      • getDefaultDriverOptions

        public org.openqa.selenium.Capabilities getDefaultDriverOptions()
        Overrides:
        getDefaultDriverOptions in class org.openqa.selenium.remote.service.DriverService
      • createDefaultService

        public static GeckoDriverService createDefaultService()
        Configures and returns a new GeckoDriverService using the default configuration. In this configuration, the service will use the GeckoDriver executable identified by the DriverFinder.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 class org.openqa.selenium.remote.service.DriverService
      • hasShutdownEndpoint

        protected boolean hasShutdownEndpoint()
        Overrides:
        hasShutdownEndpoint in class org.openqa.selenium.remote.service.DriverService