Table of Contents

Class FirefoxDriverService

Namespace
OpenQA.Selenium.Firefox
Assembly
WebDriver.dll

Exposes the service provided by the native FirefoxDriver executable.

public sealed class FirefoxDriverService : DriverService, ICommandServer, IDisposable
Inheritance
FirefoxDriverService
Implements
Inherited Members

Properties

BrowserCommunicationHost

Gets or sets the value of the IP address of the host adapter used by the driver executable to communicate with the browser.

public string BrowserCommunicationHost { get; set; }

Property Value

string

BrowserCommunicationPort

Gets or sets the port used by the driver executable to communicate with the browser.

public int BrowserCommunicationPort { get; set; }

Property Value

int

CommandLineArguments

Gets the command-line arguments for the driver service.

protected override string CommandLineArguments { get; }

Property Value

string

ConnectToRunningBrowser

Gets or sets a value indicating whether to connect to an already-running instance of Firefox.

public bool ConnectToRunningBrowser { get; set; }

Property Value

bool

FirefoxBinaryPath

Gets or sets the location of the Firefox binary executable.

public string FirefoxBinaryPath { get; set; }

Property Value

string

HasShutdown

Gets a value indicating whether the service has a shutdown API that can be called to terminate it gracefully before forcing a termination.

protected override bool HasShutdown { get; }

Property Value

bool

Host

Gets or sets the value of the IP address of the host adapter on which the service should listen for connections.

public string Host { get; set; }

Property Value

string

LogLevel

Gets or sets the level at which log output is displayed.

public FirefoxDriverLogLevel LogLevel { get; set; }

Property Value

FirefoxDriverLogLevel

Remarks

This is largely equivalent to setting the LogLevel property, except the log level is set when the driver launches, instead of when the browser is launched, meaning that initial driver logging before initiation of a session can be controlled.

OpenBrowserToolbox

Gets or sets a value indicating whether to open the Firefox Browser Toolbox when Firefox is launched.

public bool OpenBrowserToolbox { get; set; }

Property Value

bool

TerminationTimeout

Gets a value indicating the time to wait for the service to terminate before forcing it to terminate.

protected override TimeSpan TerminationTimeout { get; }

Property Value

TimeSpan

Methods

CreateDefaultService()

Creates a default instance of the FirefoxDriverService.

public static FirefoxDriverService CreateDefaultService()

Returns

FirefoxDriverService

A FirefoxDriverService that implements default settings.

CreateDefaultService(string)

Creates a default instance of the FirefoxDriverService using a specified path to the Firefox driver executable.

public static FirefoxDriverService CreateDefaultService(string driverPath)

Parameters

driverPath string

The path to the executable or the directory containing the Firefox driver executable.

Returns

FirefoxDriverService

A FirefoxDriverService using a random port.

CreateDefaultService(string, string)

Creates a default instance of the FirefoxDriverService using a specified path to the Firefox driver executable with the given name.

public static FirefoxDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)

Parameters

driverPath string

The directory containing the Firefox driver executable.

driverExecutableFileName string

The name of the Firefox driver executable file.

Returns

FirefoxDriverService

A FirefoxDriverService using a random port.

GetDefaultDriverOptions()

The browser options instance that corresponds to the driver service

protected override DriverOptions GetDefaultDriverOptions()

Returns

DriverOptions