C# Класс OpenQA.Selenium.Chrome.ChromeDriver

Provides a mechanism to write tests against Chrome
Наследование: OpenQA.Selenium.Remote.RemoteWebDriver, ITakesScreenshot
Показать файл Открыть проект Примеры использования класса

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

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

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

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

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

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

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

Метод Описание
ChromeDriver ( ChromeDriverService service, System.TimeSpan commandTimeout ) : System

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

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

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

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

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

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

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

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

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

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

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

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

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

Kills the started Chrome process and ChromeCommandExecutor if they exist
protected StopClient ( ) : void
Результат void

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

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

Accept untrusted SSL Certificates
public static bool AcceptUntrustedCertificates
Результат bool