Table of Contents

Interface ICustomDriverCommandExecutor

Namespace
OpenQA.Selenium
Assembly
WebDriver.dll

Exposes an interface to allow drivers to register and execute custom commands.

public interface ICustomDriverCommandExecutor

Methods

ExecuteCustomDriverCommand(string, Dictionary<string, object>)

Executes a command with this driver.

object ExecuteCustomDriverCommand(string driverCommandToExecute, Dictionary<string, object> parameters)

Parameters

driverCommandToExecute string

The name of the command to execute. The command name must be registered with the command executor, and must not be a command name known to this driver type.

parameters Dictionary<string, object>

A Dictionary<TKey, TValue> containing the names and values of the parameters of the command.

Returns

object

An object that contains the value returned by the command, if any.

RegisterCustomDriverCommand(string, CommandInfo)

Registers a command to be executed with this driver instance.

bool RegisterCustomDriverCommand(string commandName, CommandInfo commandInfo)

Parameters

commandName string

The unique name of the command to register.

commandInfo CommandInfo

The CommandInfo object describing the command.

Returns

bool

true if the command was registered; otherwise, false.

RegisterCustomDriverCommands(IReadOnlyDictionary<string, CommandInfo>)

Registers a set of commands to be executed with this driver instance.

void RegisterCustomDriverCommands(IReadOnlyDictionary<string, CommandInfo> commands)

Parameters

commands IReadOnlyDictionary<string, CommandInfo>

An IReadOnlyDictionary<TKey, TValue> where the keys are the names of the commands to register, and the values are the CommandInfo objects describing the commands.