C# Class OpenQA.Selenium.Chrome.ChromeDriver

Provides a mechanism to write tests against Chrome
Inheritance: OpenQA.Selenium.Remote.RemoteWebDriver, ITakesScreenshot
Afficher le fichier Open project: asynchrony/Selenium2 Class Usage Examples

Méthodes publiques

Свойство Type Description
AcceptUntrustedCertificates bool

Méthodes publiques

Méthode Description
ChromeDriver ( ) : System

Initializes a new instance of the ChromeDriver class.

ChromeDriver ( string chromeDriverDirectory ) : System

Initializes a new instance of the ChromeDriver class using the specified path to the directory containing ChromeDriver.exe.

ChromeDriver ( string chromeDriverDirectory, System.TimeSpan commandTimeout ) : System

Initializes a new instance of the ChromeDriver class using the specified path to the directory containing ChromeDriver.exe and command timeout.

GetScreenshot ( ) : Screenshot

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

Méthodes protégées

Méthode Description
StartClient ( ) : void

By default will try to load Chrome from system property webdriver.chrome.bin and the extension from webdriver.chrome.extensiondir. If the former fails, will try to guess the path to Chrome. If the latter fails, will try to unzip from the JAR we hope we're in. If these fail, throws exceptions.

StopClient ( ) : void

Kills the started Chrome process and ChromeCommandExecutor if they exist

Private Methods

Méthode Description
ChromeDriver ( ChromeDriverService service, System.TimeSpan commandTimeout ) : System

Initializes a new instance of the ChromeDriver class using the specified ChromeDriverService.

Method Details

ChromeDriver() public méthode

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

ChromeDriver() public méthode

Initializes a new instance of the ChromeDriver class using the specified path to the directory containing ChromeDriver.exe.
public ChromeDriver ( string chromeDriverDirectory ) : System
chromeDriverDirectory string The full path to the directory containing ChromeDriver.exe.
Résultat System

ChromeDriver() public méthode

Initializes a new instance of the ChromeDriver class using the specified path to the directory containing ChromeDriver.exe and command timeout.
public ChromeDriver ( string chromeDriverDirectory, System.TimeSpan commandTimeout ) : System
chromeDriverDirectory string The full path to the directory containing ChromeDriver.exe.
commandTimeout System.TimeSpan The maximum amount of time to wait for each command.
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

StartClient() protected méthode

By default will try to load Chrome from system property webdriver.chrome.bin and the extension from webdriver.chrome.extensiondir. If the former fails, will try to guess the path to Chrome. If the latter fails, will try to unzip from the JAR we hope we're in. If these fail, throws exceptions.
protected StartClient ( ) : void
Résultat void

StopClient() protected méthode

Kills the started Chrome process and ChromeCommandExecutor if they exist
protected StopClient ( ) : void
Résultat void

Property Details

AcceptUntrustedCertificates public_oe static_oe property

Accept untrusted SSL Certificates
public static bool AcceptUntrustedCertificates
Résultat bool