Table of Contents

Class FirefoxBinary

Namespace
OpenQA.Selenium.Firefox
Assembly
WebDriver.dll

Represents the binary associated with Firefox.

public class FirefoxBinary
Inheritance
FirefoxBinary
Inherited Members

Remarks

The FirefoxBinary class is responsible for instantiating the Firefox process, and the operating system environment in which it runs.

Constructors

FirefoxBinary()

Initializes a new instance of the FirefoxBinary class.

public FirefoxBinary()

FirefoxBinary(string)

Initializes a new instance of the FirefoxBinary class located at a specific file location.

public FirefoxBinary(string pathToFirefoxBinary)

Parameters

pathToFirefoxBinary string

Full path and file name to the Firefox executable.

Properties

ExtraEnvironmentVariables

Gets a Dictionary<TKey, TValue> containing string key-value pairs representing any operating system environment variables beyond the defaults.

protected Dictionary<string, string> ExtraEnvironmentVariables { get; }

Property Value

Dictionary<string, string>

IsOnLinux

Gets a value indicating whether the current operating system is Linux.

protected static bool IsOnLinux { get; }

Property Value

bool

Timeout

Gets or sets the timeout to wait for Firefox to be available for command execution.

public TimeSpan Timeout { get; set; }

Property Value

TimeSpan

Methods

CreateProfile(string)

Creates a named profile for Firefox.

public void CreateProfile(string profileName)

Parameters

profileName string

The name of the profile to create.

Quit()

Stops the execution of this FirefoxBinary, terminating the process if necessary.

public void Quit()

SetEnvironmentProperty(string, string)

Sets a variable to be used in the Firefox execution environment.

public void SetEnvironmentProperty(string propertyName, string value)

Parameters

propertyName string

The name of the environment variable to set.

value string

The value of the environment variable to set.

StartFirefoxProcess(Process)

Starts the Firefox process.

protected void StartFirefoxProcess(Process builder)

Parameters

builder Process

A Process object used to start Firefox.

StartProfile(FirefoxProfile, params string[])

Starts Firefox using the specified profile and command-line arguments.

public void StartProfile(FirefoxProfile profile, params string[] commandLineArguments)

Parameters

profile FirefoxProfile

The FirefoxProfile to use with this instance of Firefox.

commandLineArguments string[]

The command-line arguments to use in starting Firefox.

ToString()

Returns a String that represents the current Object.

public override string ToString()

Returns

string

A String that represents the current Object.

WaitForProcessExit()

Waits for the process to complete execution.

public void WaitForProcessExit()