C# Класс 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.

Наследование: OpenQA.Selenium.Remote.RemoteWebDriver, ITakesScreenshot
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
AcceptUntrustedCertificates bool
DefaultEnableNativeEvents bool
DefaultPort int

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
CreateExtensionConnection ( OpenQA.Selenium.Firefox.FirefoxBinary binary, FirefoxProfile profile, System.TimeSpan commandTimeout ) : ExtensionConnection

Описание методов

CreateElement() защищенный Метод

Creates a RemoteWebElement with the specified ID.
protected CreateElement ( string elementId ) : RemoteWebElement
elementId string The ID of this element.
Результат OpenQA.Selenium.Remote.RemoteWebElement

FirefoxDriver() публичный Метод

Initializes a new instance of the FirefoxDriver class.
public FirefoxDriver ( ) : System
Результат System

FirefoxDriver() публичный Метод

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.
Результат System

FirefoxDriver() публичный Метод

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.
Результат System

FirefoxDriver() публичный Метод

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.
Результат System

GetScreenshot() публичный Метод

Gets a Screenshot object representing the image of the page on the screen.
public GetScreenshot ( ) : Screenshot
Результат Screenshot

PrepareEnvironment() защищенный Метод

In derived classes, the PrepareEnvironment method prepares the environment for test execution.
protected PrepareEnvironment ( ) : void
Результат void

StartClient() защищенный Метод

Starts the command executor, enabling communication with the browser.
protected StartClient ( ) : void
Результат void

StopClient() защищенный Метод

Stops the command executor, ending further communication with the browser.
protected StopClient ( ) : void
Результат void

Описание свойств

AcceptUntrustedCertificates публичное статическое свойство

Indicates whether the driver will accept untrusted SSL certificates.
public static bool AcceptUntrustedCertificates
Результат bool

DefaultEnableNativeEvents публичное статическое свойство

Indicates whether native events is enabled by default for this platform.
public static bool DefaultEnableNativeEvents
Результат bool

DefaultPort публичное статическое свойство

The default port on which to communicate with the Firefox extension.
public static int DefaultPort
Результат int