Creates selenium-webdriver/remote.DriverService instances that manage a geckodriver server in a child process.

Hierarchy

Constructors

  • Parameters

    • Optional opt_exe: string

      Path to the server executable to use. If omitted, the builder will attempt to locate the geckodriver on the system PATH.

    Returns ServiceBuilder

Methods

  • Define additional command line arguments to use when starting the server.

    Parameters

    • Rest ...var_args: string[]

      The arguments to include.

    Returns ServiceBuilder

    A self reference.

  • Enables verbose logging.

    Parameters

    • Optional opt_trace: boolean

      Whether to enable trace-level logging. By default, only debug logging is enabled.

    Returns ServiceBuilder

    A self reference.

  • Defines the environment to start the server under. This setting will be inherited by every browser session started by the server. By default, the server will inherit the enviroment of the current process.

    Parameters

    • env: null | Map<string, string> | {
          [name: string]: string;
      }

      The desired environment to use, or null if the server should inherit the current environment.

    Returns ServiceBuilder

    A self reference.

  • Sets the path to the executable Firefox binary that the geckodriver should use. If this method is not called, this builder will attempt to locate Firefox in the default installation location for the current platform.

    Parameters

    • binary: string

      Path to the executable Firefox binary to use.

    Returns ServiceBuilder

    A self reference.

    See

    Binary#locate()

  • Sets the host name to access the server on. If specified, the #setLoopback() loopback setting will be ignored.

    Parameters

    • hostname: string

    Returns ServiceBuilder

    A self reference.

  • Sets the base path for WebDriver REST commands (e.g. "/wd/hub"). By default, the driver will accept commands relative to "/".

    Parameters

    • basePath: null | string

      The base path to use, or null to use the default.

    Returns ServiceBuilder

    A self reference.

  • Sets the port to start the server on.

    Parameters

    • port: number

      The port to use, or 0 for any free port.

    Returns ServiceBuilder

    A self reference.

    Throws

    If an invalid port is specified.

Generated using TypeDoc