Table of Contents

Class ChromeDriverService

Namespace
OpenQA.Selenium.Chrome
Assembly
Selenium.WebDriver.dll

Exposes the service provided by the native ChromeDriver executable.

public sealed class ChromeDriverService : ChromiumDriverService, IDisposable, IAsyncDisposable
Inheritance
ChromeDriverService
Implements
Inherited Members

Properties

DriverServiceEnvironmentVariableName

Gets the name of the environment variable used to specify the driver executable location, or null if the service does not support one.

protected override string DriverServiceEnvironmentVariableName { get; }

Property Value

string

Methods

CreateDefaultService()

Creates a default instance of the ChromeDriverService.

public static ChromeDriverService CreateDefaultService()

Returns

ChromeDriverService

A ChromeDriverService that implements default settings.

CreateDefaultService(string?)

Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable.

public static ChromeDriverService CreateDefaultService(string? driverPath)

Parameters

driverPath string

The path to the executable or the directory containing the ChromeDriver executable.

Returns

ChromeDriverService

A ChromeDriverService using a random port.

CreateDefaultService(string?, string?)

Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable with the given name.

public static ChromeDriverService CreateDefaultService(string? driverPath, string? driverExecutableFileName)

Parameters

driverPath string

The directory containing the ChromeDriver executable.

driverExecutableFileName string

The name of the ChromeDriver executable file.

Returns

ChromeDriverService

A ChromeDriverService using a random port.

GetDefaultDriverOptions()

The browser options instance that corresponds to the driver service

protected override DriverOptions GetDefaultDriverOptions()

Returns

DriverOptions