C# Class OpenQA.Selenium.Chrome.ChromeDriver

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

Public Properties

Property Type Description
AcceptUntrustedCertificates bool

Public Methods

Method 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.

Protected Methods

Method 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

Method Description
ChromeDriver ( ChromeDriverService service, System.TimeSpan commandTimeout ) : System

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

Method Details

ChromeDriver() public method

Initializes a new instance of the ChromeDriver class.
public ChromeDriver ( ) : System
return System

ChromeDriver() public method

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.
return System

ChromeDriver() public method

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.
return System

GetScreenshot() public method

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

StartClient() protected method

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
return void

StopClient() protected method

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

Property Details

AcceptUntrustedCertificates public static property

Accept untrusted SSL Certificates
public static bool AcceptUntrustedCertificates
return bool