Class FirefoxBinary
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
stringFull 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
IsOnLinux
Gets a value indicating whether the current operating system is Linux.
protected static bool IsOnLinux { get; }
Property Value
Timeout
Gets or sets the timeout to wait for Firefox to be available for command execution.
public TimeSpan Timeout { get; set; }
Property Value
Methods
CreateProfile(string)
Creates a named profile for Firefox.
public void CreateProfile(string profileName)
Parameters
profileName
stringThe 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
stringThe name of the environment variable to set.
value
stringThe value of the environment variable to set.
StartFirefoxProcess(Process)
Starts the Firefox process.
protected void StartFirefoxProcess(Process builder)
Parameters
StartProfile(FirefoxProfile, params string[])
Starts Firefox using the specified profile and command-line arguments.
public void StartProfile(FirefoxProfile profile, params string[] commandLineArguments)
Parameters
profile
FirefoxProfileThe FirefoxProfile to use with this instance of Firefox.
commandLineArguments
string[]The command-line arguments to use in starting Firefox.
ToString()
public override string ToString()
Returns
WaitForProcessExit()
Waits for the process to complete execution.
public void WaitForProcessExit()