C# Class OpenQA.Selenium.Firefox.FirefoxDriver

Provides a way to access Firefox to run tests.
When the FirefoxDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and start your test.

In the case of the FirefoxDriver, you can specify a named profile to be used, or you can let the driver create a temporary, anonymous profile. A custom extension allowing the driver to communicate to the browser will be installed into the profile.

Inheritance: OpenQA.Selenium.Remote.RemoteWebDriver, ITakesScreenshot
Afficher le fichier Open project: asynchrony/Selenium2 Class Usage Examples

Méthodes publiques

Свойство Type Description
AcceptUntrustedCertificates bool
DefaultEnableNativeEvents bool
DefaultPort int

Méthodes publiques

Méthode Description
FirefoxDriver ( ) : System

Initializes a new instance of the FirefoxDriver class.

FirefoxDriver ( OpenQA.Selenium.Firefox.FirefoxBinary binary, FirefoxProfile profile ) : System

Initializes a new instance of the FirefoxDriver class for a given profile and binary environment.

FirefoxDriver ( OpenQA.Selenium.Firefox.FirefoxBinary binary, FirefoxProfile profile, System.TimeSpan commandTimeout ) : System

Initializes a new instance of the FirefoxDriver class for a given profile, binary environment, and timeout value.

FirefoxDriver ( FirefoxProfile profile ) : System

Initializes a new instance of the FirefoxDriver class for a given profile.

GetScreenshot ( ) : Screenshot

Gets a Screenshot object representing the image of the page on the screen.

Méthodes protégées

Méthode Description
CreateElement ( string elementId ) : RemoteWebElement

Creates a RemoteWebElement with the specified ID.

PrepareEnvironment ( ) : void

In derived classes, the PrepareEnvironment method prepares the environment for test execution.

StartClient ( ) : void

Starts the command executor, enabling communication with the browser.

StopClient ( ) : void

Stops the command executor, ending further communication with the browser.

Private Methods

Méthode Description
CreateExtensionConnection ( OpenQA.Selenium.Firefox.FirefoxBinary binary, FirefoxProfile profile, System.TimeSpan commandTimeout ) : ExtensionConnection

Method Details

CreateElement() protected méthode

Creates a RemoteWebElement with the specified ID.
protected CreateElement ( string elementId ) : RemoteWebElement
elementId string The ID of this element.
Résultat OpenQA.Selenium.Remote.RemoteWebElement

FirefoxDriver() public méthode

Initializes a new instance of the FirefoxDriver class.
public FirefoxDriver ( ) : System
Résultat System

FirefoxDriver() public méthode

Initializes a new instance of the FirefoxDriver class for a given profile and binary environment.
public FirefoxDriver ( OpenQA.Selenium.Firefox.FirefoxBinary binary, FirefoxProfile profile ) : System
binary OpenQA.Selenium.Firefox.FirefoxBinary A object representing the operating system /// environmental settings used when running Firefox.
profile FirefoxProfile A object representing the profile settings /// to be used in starting Firefox.
Résultat System

FirefoxDriver() public méthode

Initializes a new instance of the FirefoxDriver class for a given profile, binary environment, and timeout value.
public FirefoxDriver ( OpenQA.Selenium.Firefox.FirefoxBinary binary, FirefoxProfile profile, System.TimeSpan commandTimeout ) : System
binary OpenQA.Selenium.Firefox.FirefoxBinary A object representing the operating system /// environmental settings used when running Firefox.
profile FirefoxProfile A object representing the profile settings /// to be used in starting Firefox.
commandTimeout System.TimeSpan The maximum amount of time to wait for each command.
Résultat System

FirefoxDriver() public méthode

Initializes a new instance of the FirefoxDriver class for a given profile.
public FirefoxDriver ( FirefoxProfile profile ) : System
profile FirefoxProfile A object representing the profile settings /// to be used in starting Firefox.
Résultat System

GetScreenshot() public méthode

Gets a Screenshot object representing the image of the page on the screen.
public GetScreenshot ( ) : Screenshot
Résultat Screenshot

PrepareEnvironment() protected méthode

In derived classes, the PrepareEnvironment method prepares the environment for test execution.
protected PrepareEnvironment ( ) : void
Résultat void

StartClient() protected méthode

Starts the command executor, enabling communication with the browser.
protected StartClient ( ) : void
Résultat void

StopClient() protected méthode

Stops the command executor, ending further communication with the browser.
protected StopClient ( ) : void
Résultat void

Property Details

AcceptUntrustedCertificates public_oe static_oe property

Indicates whether the driver will accept untrusted SSL certificates.
public static bool AcceptUntrustedCertificates
Résultat bool

DefaultEnableNativeEvents public_oe static_oe property

Indicates whether native events is enabled by default for this platform.
public static bool DefaultEnableNativeEvents
Résultat bool

DefaultPort public_oe static_oe property

The default port on which to communicate with the Firefox extension.
public static int DefaultPort
Résultat int