Table of Contents

Class CommandInfoRepository

Namespace
OpenQA.Selenium.Remote
Assembly
WebDriver.dll

Holds the information about all commands specified by the JSON wire protocol. This class cannot be inherited, as it is intended to be a singleton, and allowing subclasses introduces the possibility of multiple instances.

public abstract class CommandInfoRepository
Inheritance
CommandInfoRepository
Derived
Inherited Members

Constructors

CommandInfoRepository()

Prevents a default instance of the CommandInfoRepository class from being created.

protected CommandInfoRepository()

Properties

SpecificationLevel

public abstract int SpecificationLevel { get; }

Property Value

int

Methods

GetCommandInfo(string)

Gets the CommandInfo for a DriverCommand.

public CommandInfo GetCommandInfo(string commandName)

Parameters

commandName string

The DriverCommand for which to get the information.

Returns

CommandInfo

The CommandInfo for the specified command.

InitializeCommandDictionary()

Initializes the dictionary of commands for the CommandInfoRepository

protected abstract void InitializeCommandDictionary()

TryAddCommand(string, CommandInfo)

Tries to add a command to the list of known commands.

public bool TryAddCommand(string commandName, CommandInfo commandInfo)

Parameters

commandName string

Name of the command.

commandInfo CommandInfo

The command information.

Returns

bool

true if the new command has been added successfully; otherwise, false.

Remarks

This method is used by WebDriver implementations to add additional custom driver-specific commands. This method will not overwrite existing commands for a specific name, and will return false in that case.